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 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 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
acl manager proto cache_object
acl localhost src
acl to_localhost dst
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
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 web1 web2

Another good article about benefits of reverse proxy


132 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 so happy to read this. This is the kind of manual that needs to be given and not the accidental misinformation that’s at the other blogs. Appreciate your sharing this greatest doc.

  4. 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.

  5. Excellent beat ! I would like to apprentice while you amend your website, how could i subscribe for a blog web site? The account helped me a acceptable deal. I had been a little bit acquainted of this your broadcast offered bright clear idea

  6. 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.

  7. 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.

  8. I needed to create you a tiny word to be able to say thank you over again for your personal striking tricks you’ve featured here. This is surprisingly open-handed with you to present unhampered what exactly most people could have offered for sale for an e-book to get some profit for their own end, specifically since you could have done it in the event you desired. These advice likewise served to be a great way to understand that other people online have the identical dream much like my own to know the truth more and more when considering this issue. Certainly there are a lot more enjoyable moments up front for many who read carefully your website.

  9. I simply wanted to thank you so much again. I do not know the things I might have created in the absence of those secrets shown by you relating to this theme. It became a very alarming condition in my opinion, but discovering a specialized style you managed the issue forced me to weep for happiness. I’m just grateful for this work and in addition wish you know what a powerful job you have been getting into training some other people thru your web page. I’m certain you haven’t got to know all of us.

  10. Wow! This could be one particular of the most beneficial blogs We have ever arrive across on this subject. Basically Magnificent. I am also a specialist in this topic so I can understand your effort.

  11. Good web site! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I might be notified when a new post has been made. I’ve subscribed to your RSS feed which must do the trick! Have a nice day!

  12. I just want to mention I’m all new to blogging and site-building and actually savored your web-site. More than likely I’m want to bookmark your site . You surely come with terrific stories. Thanks a bunch for sharing your web page.

  13. I loved as much as you will receive carried out right here. The sketch is tasteful, your authored material stylish. nonetheless, you command get got an impatience over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this increase.

  14. Hi there, just became aware of your blog through Google, and found that it’s really informative. I am going to watch out for brussels. I will be grateful if you continue this in future. Lots of people will be benefited from your writing. Cheers!

  15. We are a group of volunteers and opening a new scheme in our community. Your web site offered us with valuable information to work on. You have done an impressive job and our entire community will be grateful to you.

  16. What i do not realize is in fact how you’re now not really much more neatly-appreciated than you may be right now. You’re so intelligent. You know thus considerably relating to this subject, made me in my opinion imagine it from so many varied angles. Its like women and men don’t seem to be interested unless it is one thing to do with Lady gaga! Your individual stuffs nice. All the time handle it up!

  17. I simply had to appreciate you once again. I am not sure the things that I might have gone through without the type of techniques discussed by you about that situation. It actually was a very troublesome concern for me, nevertheless considering the very specialised mode you solved the issue made me to cry over fulfillment. I’m just happy for the guidance and then have high hopes you realize what an amazing job you’re undertaking instructing people today with the aid of your web blog. Most probably you haven’t encountered any of us.