squid – reverse proxy

Great guide here – http://www.classhelper.org/articles/reverse-proxy-server-squid-debian/installing-squid-proxy-server.shtml

I’ve modified slightly for Ubuntu, but almost identical.

apt-get install squid
cp /etc/squid3/squid.conf /etc/squid3/squid.bak
rm /etc/squid3/squid.conf
nano /etc/squid/squid.conf

http_port 80 defaultsite=www.yoursite.com vhost
forwarded_for on
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
cache_peer 192.168.0.13 parent 80 0 no-query no-digest originserver name=web1
acl sites_web1 dstdomain www.yoursite.com yoursite.com
cache_peer_access web1 allow sites_web1
cache_peer 192.168.0.14 parent 80 0 no-query no-digest originserver name=web2
acl sites_web2 dstdomain www.anothersite.com anothersite.com
cache_peer_access web2 allow sites_web2
acl all src 0.0.0.0/0.0.0.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
acl Safe_ports port 80 # http
acl Safe_ports port 443 # https
acl Safe_ports port 1025-65535 # unregistered ports
acl CONNECT method CONNECT
http_access allow sites_web1
http_access allow sites_web2
http_access allow manager all
http_access allow manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
#http_access deny all
access_log /var/log/squid3/access.log
cache_mgr support@yoursite.com

 

Modify your hosts file to include web1 and web2

nano /etc/hosts

192.168.0.13 web1
192.168.0.14 web2

Another good article about benefits of reverse proxy

http://2bits.com/articles/increasing-drupals-speed-squid-caching-reverse-proxy.html

111 Replies to “squid – reverse proxy”

  1. Thank you for sharing superb informations. Your website is very cool. I am impressed by the details that you¡¦ve on this site. It reveals how nicely you understand this subject. Bookmarked this website page, will come back for more articles. You, my friend, ROCK! I found simply the information I already searched all over the place and just couldn’t come across. What an ideal site.

  2. Hi, Neat post. There’s a problem along with your site in web explorer, may check this¡K IE nonetheless is the market chief and a big part of folks will leave out your wonderful writing due to this problem.

  3. I¡¦m no longer sure the place you are getting your info, however good topic. I must spend some time studying much more or understanding more. Thanks for fantastic info I used to be on the lookout for this information for my mission.

  4. Thank you a lot for giving everyone an extremely breathtaking chance to read critical reviews from this web site. It really is very enjoyable and also stuffed with a lot of fun for me and my office friends to visit your site at a minimum three times a week to read through the fresh items you have got. Not to mention, I’m so certainly satisfied for the impressive inspiring ideas served by you. Some two facts in this posting are unequivocally the most effective I have had.

  5. Thank you so much for providing individuals with an extraordinarily pleasant opportunity to discover important secrets from this blog. It is often very amazing and also jam-packed with amusement for me personally and my office co-workers to visit the blog minimum three times per week to learn the new tips you have. Of course, I’m just actually astounded concerning the stunning tactics you give. Selected two facts on this page are in fact the very best we have all ever had.

Leave a Reply

Your email address will not be published.