Re: [squid-users] Reverse hosting

From: Emilio Casbas <ecasbas@dont-contact.us>
Date: Thu, 04 Aug 2005 14:19:43 +0200

Oleksii Krykun wrote:

> On Wed, 03 Aug 2005 11:59:48 +0200
> Kinkie <kinkie-squid@kinkie.it> wrote:
>
>> On Wed, 2005-08-03 at 12:56 +0300, Oleksii Krykun wrote:
>>
>>> I am migrating from MS Proxy 2.0 to Squid.
>>> I need reverse hosting, i.e.
>>> incoming request to
>>> http://www.server.com/dir1 is redirected to http://10.0.01/ on my LAN
>>> http://www.server.com/dir2 is redirected to http://10.0.0.2/ etc.
>>> How to do this?
>>> As I understand accelerator redirects incoming request to single
>>> server only.
>>> Is it wrong?
>>
>>
>> Not if you use httpd_accel_uses_host_header and /etc/hosts, or if you
>> use a redirector.
>
>
>
> 1.As I understand I can use virtual hosts only using
> httpd_accel_uses_host_header and /etc/hosts i.e.
> http://www.server.com -> http://10.0.0.1
> http://www1.server.com ->http://10.0.0.2

Be careful with httpd_accel_uses_host_header directive, a request such as:

Get /index.html HTTP/1.1
Host: www.anyurl.com

would success, and your reverse proxy will accept all requests for all
sites,
only your web servers should be accessed by your reverse proxy.

> where www and www1 have same external IP address.
> But I need
> http://www.server.com/dir1 -> http://10.0.0.1
> http://www.server.com/dir2 ->http://10.0.0.2
>
> 2. About redirector.
> I use squidGuard as redirect_program. I read about using multiple
> redirectors.
> But I have a question.
> Could I use two redirectors: one for blocking sites for my LAN users
> and one for reverse hosting?

It isnĀ“t need two redirectors for these purpose:

- One redirector for reverse hosting and squid.conf acl for blocking sites.
- One perl redirector with reverse hosting and acls.

Thanks
Emilio C.
Received on Thu Aug 04 2005 - 06:20:09 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Sep 01 2005 - 12:00:01 MDT