Squid Quick Start

Source: Internet
Author: User
System rhel5 1) Installation cd/usr/local/src
wget http://www. Squid-cache. org/versions/v2/2.6/squid-2.6. STABLE17. Tar. Gz
Tar xzvf squid-2.6. STABLE17. Tar. Gz
./Configure--ENABLE-ICMP--enable-htcp
Make
Make install if the operating system comes with squid 2.6, skip this step 2) Configure Squid The default profile rejects every customer request to change # http_access deny all to: http_access allow all 3 ) Initialize Setup, initialize cache directory SQUID-ZX 4) Start squid-n-d1 5) Test suqid forward proxy Configure your browser to use squid as the agent, and then open a Web page. If squid works properly, the page is quickly loaded, like no squid, this is not the focus, the key into the next 6) configuration of reverse proxy Suqid2.6 and squid2.5 There are a lot of changes, looked up some information, it is done Http_port Defau Ltsite = www. YourDomain. Com
Cache_peer $ {The IP of YourDomain} parent 0 no-query originserver Restart squid-k shutdown
Squid OK 7) caching dynamic pages but found that the dynamic URL cannot be cached, the request log is always: X-cache:miss from localhost. Localdomain so in Reponse's header add Expires:${time} finally found: X-cache:hit from Localhost.localdomain words, appears to be in force but for the URL of the belt?   Method Cache, so block the following 3 lines #hierarchy_stoplist Cgi-bin? #acl QUERY Urlpath_regex cgi-bin/? #cache deny QUERY again test finally OK I later found that if only with expires, can not take advantage of some features of the browser, if forced to refresh every time to trouble squid, and then add last-modified, the browser in the request to add If-modifi Ed-since at this time even squid do not have to take the cache, but to a 304 let the browser from the local fetch this article is designed to quickly get started squid, configuration is very rough, exquisite configuration please refer to the official documentation see the information: Squid cache time algorithm:/http wiki.squid-cache.org/squidfaq/innerworkings?highlight=%28cache-control%29# head-42f0582290981fb15dd7d7edd3d42ae8c52fa317

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.