Squid 2.4 Stable1
Configuration Manual
 

 
Previous
Table of Contents
Next

HTTPD-ACCELERATOR OPTIONS


Tag Name

httpd_accel_host

Usage

httpd_accel_host hostname(IP)|virtual

Description

This tag is used to set the hostname of the accelerated server. It’s possible to have only one destination server, so you can have only one occurrence of this line. If you are going accelerate more than one server, or transparently cache traffic, you will have to use the word virtual instead of a hostname here

Default

none

Example

httpd_accel_host 172.16.1.115
httpd_accel_host virtual
httpd_accel_host CACHE

Caution

Enabling httpd_accel_host disables proxy-caching and ICP. If you want these features enabled also, then set the ' httpd_accel_with_proxy' option.


Tag Name

httpd_accel_port

Usage

httpd_accel_port port

Description

Accelerated requests can only be forwarded to one port: there is no table that associates accelerated hosts and a destination port. Squid will connect to the port that you set the httpd_accel_port value to. When acting as a front-end for a web server on the local machine, you will set up the web server to listen for connections on a different port (8000, for example), and set this squid.conf option to match the same value. If, on the other hand, you are forwarding requests to a set of slow backend servers, they will almost certainly be listening to port 80 (the default web-server port), and this option will need to be set to 80. If you want virtual port support then specify the port as "0"

Default

none

Example

httpd_accel_port 80
httpd_accel_port 8000

Caution

-


Tag Name

httpd_accel_single_host

Usage

httpd_accel_single_host on|off

Description

If you are running Squid as an accelerator and have a single backend server then set this to on. This causes Squid to forward the request to this server regardless of what any redirectors or Host headers says.

Leave this at off if you have multiple backend servers, and use a redirector (or host table or private DNS) to map the requests to the appropriate backend servers.
See also redirect_rewrites_host_header

Default

httpd_accel_single_host off

Example

-

Caution

Note that the mapping needs to be a 1-1 mapping between requested and backend (from redirector) domain names or caching will fail, as caching is performed using the URL returned from the redirector


Tag Name

httpd_accel_with_proxy

Usage

httpd_accel_with_proxy on|off

Description

If you use the httpd_accel_host option, Squid will stop recognizing cache requests. So that your cache can function both as an accelerator and as a web cache, you will need to set the httpd_accel_with_proxy option to on.

Default

See Description.

Example

-

Caution

-


Tag Name

httpd_accel_uses_host_header

Usage

httpd_accel_uses_host_header on|off

Description

HTTP/1.1 requests include a Host: header, which is basically the hostname from the URL. Squid can be an accelerator for different HTTP servers by looking at this header. However, Squid does NOT check the value of the Host header, so it opens a big security hole. It is recommended that this option remain disabled unless having good understanding..

However, It is needed to enable this option if Squid run as a transparent proxy. Otherwise, virtual servers, which require the Host: header will not be properly cached. For detailed information, Click here

Default

httpd_accel_uses_host_header off

Example

-

Caution

If Squid run as a transparent proxy, It is needed to enable this option