In the process of migrating a simple reverse proxy from a Linux box to 
OpenBSD (4.9-i386) I've come across a problem behavior that seems to 
indicate that the directive ProxyPreserveHost is not working. In fact 
setting it on or off does not affect the perceived behavior at all.

The setup is rather simple and syntactically identical between the 
Linux Apache2 and OpenBSD base httpd (Apache 1.3+):

        <VirtualHost [public_ip]>
                ServerName      www.customer.com
                ErrorLog                logs/error_log
                CustomLog       logs/access_log common
                ProxyPreserveHost On
                ProxyPass               / http://10.xx.yy.zz/
                ProxyPassReverse        / http://10.xx.yy.zz/
        </VirtualHost>

The resulting behaviors differ thus:

request http://www.customer.com/test/page.aspx --
*want/linux: the backend server recognizes that the request is for 
virtual server named www.customer.com and delivers the required page;
*openbsd: the backend server sees http://10.xx.yy.zz/test/page.aspx, 
does not recognize the site and returns 404 Page not found.

request http://www.customer.com/ --
*want/linux: the backend server recognizes the site and correctly forms 
all self-referential links on the home page;
*openbsd: the backend server generates all self-referential links as 
http://10.xx.yy.zz/... which get handed back to the client outside the 
firewall, rendering the website not usable.

I checked cvsweb for the proxy module of the base httpd, and it has had 
no commits in year, so I believe I am running the latest code.

Please let me know if/what additional diagnostic info is needed, or 
hopefully patches to test.

Thanks,
-Jacob.

Reply via email to