Re: [squid-users] Reverse proxy: destination hostname different from real hostname

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 30 May 2014 14:02:38 +1200

On 30/05/2014 1:35 p.m., Sipos Ferenc wrote:
> Hi,
>
> url_rewrite is good solution, too.
>
>
> Regards,
> Sipi
>
> On 2014-05-29 22:15, Sipos Ferenc wrote:
>> Hi,
>>
>> I beleive you are looking for this:
>> http://www.squid-cache.org/Doc/config/request_header_replace/
>> (replace the host header)
>>

Neither of the above is what he is asked about though.

dstdomain (and DNS entries) are about the traffic received from the
client, not the outgoing traffic from Squid.

"The right Way" is to virtual host. The current releases of Squid do
that already by default, older versions require vhost parameter on
http_port. Squid will pass the virtual hosted domain name straight
through to the backend server for proper handling.

If the backend server is not able to cope with virtual hosting, then the
forcedomain parameter on cache_peer can be used. But note that this
parameter has (most of) the same problems and limitations as URL re-writing.

Amos

>> On 2014-05-29 21:47, Roberto Carna wrote:
>>> Dear, suppose I have a web server with a DNS hostname
>>> "server.company.com" I want to access, is it possible to setup
>>> squid.conf for a reverse mode that uses "alias-server.company.com" as
>>> dstdomain ??? Or do I have to use the DNS hostname mandatory ???
>>>
>>> Special thanks,
>>>
>>> Roberto
>>>
>>
>
Received on Fri May 30 2014 - 02:02:44 MDT

This archive was generated by hypermail 2.2.0 : Fri May 30 2014 - 12:00:06 MDT