Questions about virtual hosting, and proxying

From: Andy Steingruebl <>
Date: Mon, 16 Mar 1998 11:54:14 -0600

I've got squid-1.1.14 running on a Solaris 2.5.1 machine.
The version here is probably irrelevant.

I'm trying to

A. Run squid as a proxy
B. Run squid as an httpd_accel
C. Run squid on port 80
D. Run webserver on port 81

If I turn on
httpd_accel_uses_host_header on

Then squid properly rewrites the URL inside parseHttpRequest(). It analyzes
req_hdr to look for a Host: header in the incoming http request stream.

Unfortunately, it does not modify the Host header. When the unmodified Host:
header gets sent to the webserver, the webserver doesn't recognize the Host:
as one of its virtual hosts. When I manually send the request but modify the
Host: header to include the port

GET / HTTP/1.1
Host: machine:81

I get the web page for the virtual server as expected.

Looks like the solution to the problem is to modify the req_hdr either in
icp.c or in http.c where we are generating the http request.

Has this been fixed in a later version? I just got done looking through 1.2.20
and it doesn't look like it.

Thanks for any help. I'm happy to help make the changes myself if necessary,
but if someone else has already gone through the trouble if rewriting the
header block, I don't want to do it again.

* Andy Steingruebl              | e-mail:          *
* Consultant                    | phone:  (847) 935-4728                    *
* Unix Systems Admin/Programmer | fax:    (847) 935-0142                    *
* Unix/Network Security         | post:   100 Abbott Park Road, AP9A-D472   *
* Abbott Laboratories, PPDR&D   |         Abbott Park, IL 60064-3508        *
*           PGP public key: Not Currently On Any KeyServer                  *
Received on Mon Mar 16 1998 - 09:55:26 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:39:23 MST