[squid-users] Squid ReverseProxy with vhost vport - Problem

From: <tim.schmeling_at_bechtle.com>
Date: Wed, 20 Jul 2011 16:34:28 +0200

Hi Squid-Users,

i have a big problem and i hope that anyone can help me.
I like to setup a squid reverse proxy with ip based virtual hosts in
apache.

Client -> Pound (10.1.24.145:80) -> Squid (10.1.24.145:3007) -> Apache
(127.0.0.1:3007)

Virtual hosts in apache works perfect, but the following error occurs when
i try to connect over pound/squid:

access.log from squid:
1311171399.324 157 10.1.24.145 TCP_MISS/503 4014 GET http://sub3007/ -
DIRECT/127.0.0.1 text/html

The cache.log says me:
...
2011/07/20 16:16:39.166| parseHttpRequest: req_hdr = {Host: sub3007
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101
Firefox/5.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection: keep-alive
Cache-Control: max-age=0
X-Forwarded-For: 10.1.24.81
}
2011/07/20 16:16:39.166| parseHttpRequest: end = {
...

The Squid tries to connect to 127.0.0.1:80 to apache, but this is wrong,
it might be 127.0.0.1:3007 (the vport).

Here is my squid.conf:

http_port 10.1.24.145:3007 vhost vport
http_port 10.1.24.145:3008 vhost vport
...
here are some acl´s
...
acl Safe_ports port 3000-3030
http_access deny !Safe_ports
http_access deny deniedrequest
http_access allow internurl intraweb
http_access allow adminurl intraweb
http_access allow adminurl admin
http_access allow extern
http_access deny intraweb
http_access deny admin
http_access deny deniedbrowser
http_access allow aha_my_test
http_access deny all
cache deny all
httpd_suppress_version_string on
always_direct allow all
max_open_disk_fds 8192
coredump_dir /usr/local/squid/var/cache

Can anyone help me?

Greetz

Tim Schmeling

Ps: Sorry for my bad english.
Received on Wed Jul 20 2011 - 14:34:39 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 21 2011 - 12:00:07 MDT