Forum Moderators: phranque
I am trying to setup a reverse proxy to hide application server behind a DMZ web server. I have modified the httpd.conf file on the Apache web server and able to redirect using reverse proxy but I dont want application server to expose at all.
So what kind of rewrite rules I can use to accomplish this?
Here is what I have in my web server httpd.conf file for app server access.
ProxyPassReverse / [<App...] Server IP>:Port
RewriteEngine On
ProxyPreserveHost On
RewriteRule ^/(.*) [<App...] Server IP>:Port/$1 [P]
When I access my web server [<Web...] Server>/AppServerDir it redirects me to the App Server URL.
Any help or direction in this matter?
Thanks,
RJ
And again, you won't need to use both ProxyPass and a RewriteRule, just one or the other.
If you haven't already done so, completely flush (delete) your browser cache, and delete it again after any server-side code change (and server restart).
Jim
Now I am getting proxy error while accessing the URL.
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request GET /web/was.dll.
Reason: Error reading from remote server
How can I write a rewrite rule which can allow me to access internal website using a external url in DMZ?
for example:
[external.com...] map to [internal.com...]
not the redirect.