Henrik Nordstrom wrote:
>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
>>
>>
>
>
>
Thx so far.
If I use
httpd_accel_uses_host_header on
and put my domains in the hosts file, what do I then need the directive
httpd_accel_host your.primary.domain
for? Since the entries in the hosts file are used (due to the first
directive), it is possible to use
a complete different server than given by ' httpd_accel_host', isn't it?
(Simply by the entries in the
hosts file)
And one more question:
Using
httpd_accel_uses_host_header off
httpd_accel_host your.primary.domain
redirect_rewrites_host_header on
shouldn't now the client requests go to server your.primary.domain, using different host
headers in these request, so that still virtual webservers could be used (if the webserver is configured to use the host-headers)?
Or is 'redirect_rewrites_host_header on' only used if I have a dedicated redirect script?
Sorry for all these questions, but I still do not understand this stuff completely.
Stefan
Received on Mon Jul 08 2002 - 05:01:28 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:11 MST