RE: [squid-users] Reverse proxy problem again

From: Niti Lohwithee <nitil@dont-contact.us>
Date: Fri, 15 Aug 2003 10:00:43 +0700

Dear Henrik,

                Thank you in your suggesstion. I 'm missing for some
requirement. In fact. My requirement is that the webmail can be
used from Internet Through this reverse proxy. When users access to the
Central Webmail for "first time", it checks username and password for
authentication. If pass, then redirect to one of the mail servers which
the user's mailbox exist.
                The squid config , /etc/host and redirect program is
below.

/etc/hosts
-------------------------
162.xx.xx.0 centralmail
162.xx.xx.1 webmail1
162.xx.xx.2 webmail2
162.xx.xx.3 webmail3
162.xx.xx.4 webmail4

Squid.conf
--------------------------------
http_port 80
httpd_accel_host virtual
httpd_accel_single_host off
httpd_accel_uses_host_header on
httpd_accel_with_proxy on
httpd_accel_port 80
 
visible_hostname centralmail
acl all src 0.0.0.0/0.0.0.0
http_access allow all

redirect_program /usr/local/squid-reverse/bin/ip_redirector.pl

Ip_redirector.pl
__________________________________________________
#!/usr/bin/perl -p
s%http://centralmail\b%http://reverse-proxy%;

                
        When I access the webmail , It 's not work .And the error
meesage namely access denied and Forwards loop detect have not appear.
The cache.log have no any error . The access.log display as below
        
1060912813.080 1 reverse-proxy TCP_MISS/403 1367 GET
http://reverse-proxy
/ - NONE/- text/html
1060912813.081 3 client TCP_MISS/403 1411 GET http://reverse-proxy
- DIRECT/172.30.251.143 text/html

        Could you help me please?

Regards and Thank you in advance

Regards
Niti : )

-----Original Message-----
From: Henrik Nordstrom [mailto:hno@squid-cache.org]
Sent: Thursday, August 14, 2003 9:58 PM
To: Niti Lohwithee
Cc: jonathan soong; squid-users@squid-cache.org; Siriporn Hayuk
Subject: RE: [squid-users] Reverse proxy problem

On Thu, 14 Aug 2003, Niti Lohwithee wrote:

> Additional information, when I access the web access the webmail
.
> The messages.log display that WARNING: Forwarding loop detected for:
> GET / HTTP/1.0^M Accept: image/gif, image/x-xbitmap, image/jpeg,
> image/pjpeg, appli cation/vnd.ms-excel, application/vnd.ms-powerpoint,

> ...............

Your squid does not know how to find it's way to the real servers. Two
possible causes here

a) The server the user asked for is not in your /etc/hosts file.

b) You have specified "httpd_accel_host virtual" but not
"httpd_accel_uses_host_header on". Such configuration will make Squid
try
to contact it's own IP address all the time as "httpd_accel_host
virtual"
tells it to reconstruct the URL using the IP address.

Which of the two is obvious if you look into access.log.

Regards
Henrik
Received on Thu Aug 14 2003 - 20:59:24 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:18:55 MST