-   Linux - Server (
-   -   Apache as Reverse Proxy (

LR_Brian 02-16-2009 04:12 PM

Apache as Reverse Proxy

I am very desperate to resolve an issue I've been having. First off, I apologize, the servers I have in my office are all Windows based servers. :(

If you kept reading, thank you. Here goes:

I am currently running a third party software hosted in IIS6.0 on W2K3. The software is hosted as Virtual Directories under the Default Website.

The probelm, if you visit our website, you will be prompted with a login portal. Login with credentials Test and password CC3Demo and Context Luce. Once logged in, click the Reporting link at the top of the page. Notice that it is a javascript call that inserts the servers private IP address ( and the request will timeout with a 404 error.

This is where Apache comes in. I heard through some advice that I should install Apache to use the Reverse Proxy functions. So I did my homework and changed my IIS site binding to port 8080 and installed Apache to port 80.

So I did some searching and initially tried to use the ReWrite rules to rewrite the IP address to the external IP instead of No matter how hard I tried, this did not work.

So then I did some more homework and tried to use the ProxyPass and ProxyPassReverse commands, and it seems to serve my pages when I visit instead of So I am thinking the Reverse Proxy is working; however when you click the Reporting link, again it launches the window with a request to the internal server IP.

More digging turned up ProxyHTMLExtended on with ProxyHTMLURLMap commands. I added these to the config file and voila, it rewrote the ip address from the javascript window. The problem is that it works TOO good. It is now rewriting the IP address even on internal requests to the and clicking reporting will now try to open the page which will ultimately timeout.

I am at a loss and desperate for help.

Thanks in advance for your help and advice.

LR_Brian 02-16-2009 04:12 PM

3 Attachment(s)
Attached you will find my httpd.conf, error.log and access.log.

chort 02-16-2009 06:20 PM

You're much better off tackling this from the IIS website side. You need to figure out why the script is generating links to IPs instead of hostnames. If the site's script would properly generate URLs that refer to the hostname of the site, you could easily control which IP it is through DNS. Your internal clients would get the internal IP, and external clients would get the public IP. You're going to have no end of pain if you try to solve this by using URL re-writing.

LR_Brian 02-17-2009 10:46 AM

Hi chort,

Thanks for your reply. The only feasible way to tackle this from the IIS side is to install ISA Server, which I've looked into, but the price is rediculous.

Sadly the software was designed to be installed to and used with IP addresses, so the option for using DNS resolution does not exist. This is a request I have made with them numerous times.

This has led me to try the Apache solution as described above.

I do appreciate your suggestions and response.

Thanks again.

chort 02-17-2009 11:33 AM

Then the software is totally broken. Use different software that isn't broken. If it was developed in-house, tell them they need to rewrite it to behave like a proper networked application. Trying to solve fundamentally broken software by applying layers of work-arounds is like trying to repair a broken leg with bandaids.

All times are GMT -5. The time now is 09:20 AM.