[Share] PHP site uses Squid to accelerate your WEB

Source: Internet
Author: User
Tags squid proxy

Link: http://soft.zdnet.com.cn/software_zone/2007/0902/485972.shtml

First, you have to have the SQUID proxy server. I won't talk about how to install it. Just use her rpm for redhat installation.

Configure the SQUID configuration file to support the httpd accelerator working mode.

Edit the "SQUID. conf" file (vi/etc/SQUID. conf) and add the following content:

Http_port 80

Icp_port 0

Acl QUERY urlpath_regex cgi-bin?

No_cache deny QUERY

Cache_mem 16 MB

Cache_dir ufs/tmp 256 16 256

Log_icp_queries off

Buffered_logs on

Emulate_httpd_log on

Redirect_rewrites_host_header off

Half_closed_clients off

Acl all src 0.0.0.0/0.0.0.0

Http_access allow all

Cache_mgr admin

Cache_inclutive_user SQUID

Cache_paitive_group SQUID

Httpd_accel_host 210.51.0.124

Httpd_accel_port 81

  

The http_port parameter specifies the port number that SQUID listens to browser client requests. Of course, 80 is used here.

Cache_dir ufs/tmp 256 16 256

The cache_dir parameter sets the type of the storage system used. Generally, the data type should be ufs and the directory should be "/tmp". The buffer value used in this directory is 256 MB, the number of first-level sub-directories allowed to be created under "/tmp" is 16, and the number of second-level sub-directories that can be created under each first-level sub-directory is 256

The options "httpd_accel_host" and "httpd_accel_port" define the Real Web server host name and port number. In the configuration, the real HTTP server runs on the host with the IP address 210.51.0.124 (www.5iLinux.com) and the running port is 81.

OK. SQUID settings are complete.

Next, set apache. You only need to set your httpd listening port to 81, and then restart apache.

Restart your SQUID service. Now you have used SQUID's http acceleration mode to access your Web site. You can view SQUID's log to view its running status.

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.