# My Squid.conf



## cryingvalor (Nov 4, 2006)

-hey guys i setup a squid proxy in our ubuntu for our office whose purpose is for web proxy for faster web browsing and for ACL. but i have doubt in the "faster web browsing" because i observer for sometime that there is no difference in term of speed in web browsing when our office computers are connected to the squid-proxy and when it is directly connected to our DSL. can you pls check if my squid.conf if someting is missing or incorrect...




> http_port 80
> 
> cache_mem 200 MB
> cache_swap_low 90
> ...


----------



## Cellus (Aug 31, 2006)

Other than for access control, I wouldn't exactly call having a proxy server like Squid to make your surfing experience faster. Keep in mind web traffic has to go to the proxy, pass through its filters, then be routed out to reach the workstations. This inevitably takes extra time.


----------



## removed82807c (Jan 30, 2007)

Cellus, imagine this... you have a link to the internet, about 20mbps. You share this with 1500 people. Your internal network delivers everybody 5mpbs.

You make the calculation if that cache makes a difference.


----------



## sapanda (Aug 6, 2007)

I have the same problem, with squid, here is my squid conf file, and the error i see wen i open the /var/log/squid/cache/log
http_port 3128 8080
icp_port 0
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 96 MB
cache_replacement_policy lru
cache_dir ufs /var/spool/squid 600 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log/squid/store.log
redirect_rewrites_host_header off
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440	20%	10080
refresh_pattern ^gopher:	1440	0%	1440
refresh_pattern . 0	20%	4320
acl localnet src 192.168.0.0/255.255.255.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563	# https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535	# unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
acl all src 0.0.0.0/0.0.0.0
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
cache_mgr [email protected]
cache_effective_user squid
cache_effective_group squid
visible_hostname dataprocess.net
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
log_icp_queries off
cachemgr_passwd my-secret-pass all
buffered_logs on
coredump_dir /var/spool/squid

Then I issued the follwoing command to redirect any request to port 80 to port 3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128 

When i issue this command to test the squid, it hangs without any response
tail -f /var/log/squid/acces.log

Here is error i see when i chk the log file in /var/log/squid/cache.log

2007/08/07 09:47:39| Starting Squid Cache version 2.5.STABLE1 for i386-redhat-linux-gnu...
2007/08/07 09:47:39| Process ID 2392
2007/08/07 09:47:39| With 1024 file descriptors available
2007/08/07 09:47:39| DNS Socket created at 0.0.0.0, port 32770, FD 5
2007/08/07 09:47:39| Adding nameserver 172.16.50.1 from /etc/resolv.conf
2007/08/07 09:47:39| Adding nameserver 193.219.204.62 from /etc/resolv.conf
2007/08/07 09:47:39| Adding nameserver 205.171.3.65 from /etc/resolv.conf
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_READ_TIMEOUT': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_LIFETIME_EXP': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_READ_ERROR': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_WRITE_ERROR': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_SHUTTING_DOWN': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_CONNECT_FAIL': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_INVALID_REQ': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_UNSUP_REQ': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_INVALID_URL': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_SOCKET_FAILURE': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_DNS_FAIL': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_CANNOT_FORWARD': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FORWARDING_DENIED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_NO_RELAY': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_ZERO_SIZE_OBJECT': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_DISABLED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_FAILURE': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_URN_RESOLVE': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_ACCESS_DENIED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_CACHE_ACCESS_DENIED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_CACHE_MGR_ACCESS_DENIED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_PUT_CREATED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_PUT_MODIFIED': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_PUT_ERROR': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_NOT_FOUND': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_FORBIDDEN': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_FTP_UNAVAILABLE': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_ONLY_IF_CACHED_MISS': (2) No such file or directory
2007/08/07 09:47:39| errorTryLoadText: '/usr/share/squid/errors/ERR_TOO_BIG': (2) No such file or directory


I dont know the meaning of this as i want to know the meaning of it and know if i am having error in my squid.conf file.


----------

