Hi Experts,
I'm trying to configure my Apache in RHEL6 as a Reverse Proxy. I configured my Reverse Proxy (RP) to forward the request to the Internel Webserver.
Client ---> Reverse Proxy (https://proxy.net.test)----> Internal Web Server (https://internal.net.test)
Reverse Proxy - 172.31.5.x
Internal Web Server - 10.18.2.x
When users are browsing
https://proxy.net.test, he/she actually being redirected to
https://internal.net.test. This is working fine with the below configuration in /etc/httpd/conf/httpd.conf in my Proxy server:
-------------------------------
Listen 172.31.5.42:80
ProxyPreserveHost On
ProxyRequests off
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
SSLProxyEngine On
RequestHeader set Front-End-Https "On"
ProxyPass /
https://internal.net.test/
ProxyPassReverse /
https://internal.net.test/
-------------------------------
Now I'm stuck when I'm trying to acheive the below thing:
Users will access
https://proxy.net.test/dsview and he/she will be redirected to
https://internal.net.test/
Everytime I try to access, I end up with the below error:
[Thu Feb 28 18:55:11 2013] [error] [client 172.31.3.x] File does not exist: /var/www/html/dsview
The confguration what I put in httpd.conf in Proxy Server is (after googling for 2 days):
--------------------------------------------------
ProxyRequests Off
# Redirect HTTP requests to HTTPS
<VirtualHost 172.31.5.x:80>
ServerName proxy.net.test
ServerAlias proxy.net.test
Redirect /
https://proxy.net.test/
</VirtualHost>
<VirtualHost 172.31.5.x:443>
ServerName proxy.net.test
ServerAlias proxy.net.test
ErrorLog /var/log/httpd/dsview_error_log
TransferLog /var/log/httpd/dsview_access_log
ProxyPreserveHost On
ProxyPass /dsview/
https://internal.net.test/
ProxyPassReverse /dsview/
https://internal.net.test/
SSLEngine On
SSLProxyEngine On
RequestHeader set Front-End-Https "On"
SSLCertificateFile /etc/pki/tls/certs/proxy
SSLCertificateKeyFile /etc/pki/tls/private/proxy
</VirtualHost>
--------------------------------------------------
Firewall port 80 and 443 is open between proxy and internal web server.
I've the below hosts file entry in Proxy server:
172.31.5.x proxy.net.itc proxy
10.18.2.x internal.net.test
Please note self signed certificate is also generated and working properly.
When I'm accessing
https://proxy.net.itc/dsview, it is not redirecting at all and ending up with :
404 File not found
and error log showing:
[Thu Feb 28 18:55:11 2013] [error] [client 172.31.3.x] File does not exist: /var/www/html/dsview
I'm completely stuck here. Any suggestion will be of great help.
Thanks in advance.