Setting up sqid for the first time. Kinda got it..
Hey guys, so I setup squid for the first time, and it kind of works, but not completely...
Here is my config file as it is now..
Two things wrong with the above..
# egrep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d'
http_port 80 defaultsite=##.##.##.## # Main IP Of Central web server here
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY
acl apache rep_header Server ^Apache
access_log /var/log/squid/access.log squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
cache_dir ufs /var/spool/squid 1000 16 256
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 # https, snews
acl SSL_ports port 873 # rsync
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 Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
acl lan src 10.0.0.0/8
http_access allow all
http_access allow lan
http_reply_access allow all
icp_access allow all
always_direct allow all
1) Its wicked wicked slow after a bit. I will use browsermob to time the page load when I kill apache and start squid, and it will be just as fast running apache as it will be running squid to pipe traffic to the main server... give it a few minutes, and it will go from 1 second load time per a page to like 7, or more, or wont even load... What kind of cache settings do you recommend?
2) For this one, I guess I need to explain how it will work. Lets say I have 3 servers, 1 is the central server which is the real httpd/mysql/php server, which serves the web pages. The other 2 are reverse squid proxies, which do nothing but pipe the traffic back to the main central server, and act as front end web pages. My question is.. how do I let the central server know which domain its being visited from? Im guessing I need to use vhosts somehow? I have like 6 domains all doing this, and if you look at the $_SERVER['SERVER_NAME'] or $_SREVER['HTTP_HOST'], both will say the default IP thats configured in the squid server... How do I fix that?
Thanks guys, any help is appriceated