Skip to content

Instantly share code, notes, and snippets.

@ruo91
Last active December 22, 2015 15:49
Show Gist options
  • Save ruo91/6494744 to your computer and use it in GitHub Desktop.
Save ruo91/6494744 to your computer and use it in GitHub Desktop.
squid.conf (3.3.8 stable)
# 프록시 포트 ( 기본 포트는 3128 )
http_port 3128
# 프록시 호스트명
visible_hostname ruo91
#캐시에 사용될 메모리 지정
# 512 MB = 160 MB, 1024 MB = 320 MB
cache_mem 320 MB
# squid 관리자
cache_mgr ruo91@yongbok.net
# cache가 squid란 uid/gid로 작동,보안을 위해
cache_effective_user squid
cache_effective_group squid
# 캐쉬로 사용할 디렉토리와 용량설정
# 1000 => 최대 캐쉬디렉토리 크기, 20 =>1차 하위 디렉토리 개수, 512 => 2차 하위 디렉토리 개수
cache_dir ufs /usr/local/squid/var/cache/squid 1000 20 512
# localhost 라는 호스트명에 IP대역을 부여
acl localhost src 127.0.0.1
# ruo91 라는 호스트명에 IP대역을 부여
# 실제 클라이언트의 아이피 대역을 적어주시면 됩니다.
# 예를들어 192.168.0.0/24 대역에서 사용 가능하도록 하려면 아래오 ㅏ같이 하시면 됩니다.
acl ruo91 src 192.168.0.0/24
# localhost 호스트에 부여된 대역에 HTTP 액세스 허용
http_access allow localhost
# localhost 호스트에 부여된 대역에 ICP 액세스 허용
icp_access allow localhost
# ruo91 호스트에 부여된 대역에 HTTP 액세스 허용
http_access allow ruo91
# ruo91 호스트에 부여된 대역에 ICP 액세스 허용
icp_access allow ruo91
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment