You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by br...@rapistan.com on 2002/07/31 22:17:21 UTC
Apache 2.0/Win32+mod_proxy+mod_headers+Outlook Web Access 2000
I have Apache 2.0.39 with mod_ssl, mod_proxy and mod_headers running on a
Windows 2000 box (don't ask, not -my- decision). The OWA box is Exchange
2000. It appears that OWA is taking what it sees in the Host header (from
the proxy server) and creating absolute URLs with that information
dynamically. I confirmed this by setting up an alias in my DNS for the OWA
box and examining the resulting html code from OWA. I have also performed
a packet capture on the proxy server and confirmed that the Host header is
in fact getting set to the name of the OWA server and not to the proxy
server (so OWA will form the URLs correctly). After this, I enabled
mod_headers and created a line in my httpd.conf under the virtual host for
the following : Header set Host owaproxy.domainname.tld (see virtual host
section snippit below). I also set the RequestHeader to the same for
testing with no results (the packet capture confirms that the http request
made from the proxy to the owa server has the name of the server indicated
in the ProxyPass statement). This says to me that Apache is not rewriting
outbound headers or the Apache re-write is getting re-written at some
subsequent level below this. I even went so far as to unset the
X-Forwarded-* headers, and they showed up in the capture. I set an
arbitrary header "myheader" to confirm that mod_header is functioning, and
from the capture saw that it was. My question is, is there a better way of
achieving this? Am I missing something mundane?
A little note : I plan on eventually using this with SSL as well, which
I've confirmed works with other applications, just not OWA. I -hoping-
it's just a matter of configuring it, creating some certificates, and then
I'm good to go.
Here's my virtual host config
<VirtualHost *:80>
ServerAdmin bradley.watson@rapistan.com
ServerName owaproxy.domainname.tld
Header set Host owaproxy.domainname.tld
RequestHeader set Host owaproxy.domainname.tld
ProxyPass / http://owaserver.domainname.tld
ProxyPassReverse / http://owaserver.domainname.tld
ErrorLog d:/apache2/logs/proxylog.log
</VirtualHost>
Many many many thanks for any pointers, tips, or pointing out of obvious
blunders on my part, and I thank you for your time.
Best Regards/Mit freundlichen GrĂ¼ssen,
Brad Watson
Siemens Dematic MA AM OI
bradley.watson@rapistan.com
+1 616 913 5162 Phone
+1 616 913 5572 Fax
--------------------------------------------------------------------------------------------
"It's not the destination that's important, it's the
journey" -- Ken Kesey (1935-2001)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: Apache 2.0/Win32+mod_proxy+mod_headers+Outlook Web Access 2000
Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 31 Jul 2002 bradley.watson@rapistan.com wrote:
>
> I have Apache 2.0.39 with mod_ssl, mod_proxy and mod_headers running on a
> Windows 2000 box (don't ask, not -my- decision). The OWA box is Exchange
> 2000. It appears that OWA is taking what it sees in the Host header (from
> the proxy server) and creating absolute URLs with that information
> dynamically. I confirmed this by setting up an alias in my DNS for the OWA
> box and examining the resulting html code from OWA. I have also performed
> a packet capture on the proxy server and confirmed that the Host header is
> in fact getting set to the name of the OWA server and not to the proxy
> server (so OWA will form the URLs correctly). After this, I enabled
> mod_headers and created a line in my httpd.conf under the virtual host for
> the following : Header set Host owaproxy.domainname.tld (see virtual host
> section snippit below).
Paragraphs, man. Use paragraphs ;-)
Anyway, your problem is that mod_headers cannot rewrite standard HTTP
headers used by apache. But since you are using Apache 2, there is a very
simple answer:
http://httpd.apache.org/docs-2.0/mod/mod_proxy.html#proxypreservehost
Joshua.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org