Re: [squid-users] Reverse proxying http and https

From: Amos Jeffries <squid3@dont-contact.us>
Date: Wed, 17 Oct 2007 01:33:57 +1300

Taneli Leppä wrote:
> Hello,
>
> I'm trying to configure a reverse proxy using Squid 2.6 to
> serve pages from another server, using both http and https.
>
> Lets say my cache server is mycache.net and I want to serve
> both types of pages from cached.mycache.net. The result I'm
> looking for is:
>
> http://mycache.net/page -> http://cached.mycache.net/page
> https://mycache.net/page -> https://cached.mycache.net/page
>
> I can get the configuration working so that http and https
> go to destination site's http or https port, but not both
> at the same time. My current configuration is like this:
>
> http_port mycache.net:80 vhost vport
> https_port mycache.net:443 vhost vport key=/etc/squid/mycache.key
> cert=/etc/squid/mycache.crt

I suggest adding defaultsite=mysite.example.net to those to help out
users with broken software.

>
> cache_peer cached.mycache.net parent 80 0 originserver
>
> acl valid_dst dst mycache.net
> http_access allow valid_dst
>
> I tried adding another cache_peer with port 443, but Squid
> just complains that such cache_peer already exists.
>
> Any tips for making this configuration work?
>

add name=XX to the existing cache_peer
then add:
   cache_peer cached.mycache.net parent 443 0 originserver name=YY

all cache_peer_access and cache_peer_domains need to now refer to XX and
YY instead of the peer FQDN.

Amos
Received on Tue Oct 16 2007 - 06:34:10 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:01 MDT