The easies setup is using no redirector at all..
build your squid with --disable-internal-dns (or use Squid-2.5), and
put the domains in your /etc/hosts file with the IP address of the
real server, and the following in squid.conf:
httpd_accel_host your.primary.domain
httpd_accel_uses_host_header on
You need httpd_accel_uses_host_header if you want Squid to understand
virtual domains. If not it will only use what you have in
httpd_accel_host.
redirect_rewrites_host_header affects the host header sent to the
server when there is a redirector in the path rewriting the URL, but
note that Squid caches on the URL after redirection so you need to be
very careful when using this directive in combination with virtual
domains on your real server..
Regards
Henrik
On Monday 08 July 2002 08.19, Stefan M. Ritter wrote:
> Hi,
> I have a question regarding
> httpd_accel_uses_host_header
> redirect_rewrites_host_header
> I am using squid in accelerating mode (via 'httpd_accel_host
> my_host.domain.com') and want to use
> several virtual hosts without using a special redirect-scripts; now
> I made some debbuging test with the following configuration: there
> is one real server (calles my_host.domain.com) with two virtual web
> servers on it (e.g. www.test1.domain.com, www.test2.domain.com) the
> clients should use www.buy.domain.com and www.pay.domain.com:
>
> First, if I use
> ' httpd_accel_uses_host_header off'
> then regardless of the value in 'httpd_accel_uses_host_header' each
> request goes to 'my_host.domain.com';
> but if I use
> ' httpd_accel_uses_host_header on'
> then the value in 'httpd_accel_uses_host_header' seems to be used
> and each requests goes to the
> virtual host the client specified in his request, that is
> www.buy.domain.com and www.pay.domain.com.
>
> So, for me it seems as if I want to use virtual hosts on ONE
> server, I have to set
> ' httpd_accel_uses_host_header on'
> ' httpd_accel_uses_host_header on'
> But from the description in squid.conf, it seems as if only the
> last one should be required.
> Is this right or am I misanderstanding the whole story???
>
> Thx in advance,
> Stefan
Received on Mon Jul 08 2002 - 04:21:28 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:11 MST