We have a legacy application with URL https://www2.devDocApp.com/
which is running on Ubuntu8
so and apache2.2
with no TLS 1.2 support, we had hardtime upgrading apache2.2
and openSSL on Ubuntu 8 box, so now we are standing proxy apache
server (devapp01
windows 2012 VM with Apache/2.4.29 (Win64)) which redirects all the requests to https://www2.devDocApp.com/
Below is the apache configuration I've used to set up proxy server devapp01
<VirtualHost *:443>
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"
DocumentRoot "C:/apache/htdocs"
ServerName devapp01
#ErrorLog "|bin/rotatelogs.exe -l -f C:/apache/logs/apache_error_log.%m-%d-%y-%I-%M-%S.log 86400"
#TransferLog "|bin/rotatelogs.exe -l -f C:/apache/logs/apache_transfer_log.%m-%d-%y-%I-%M-%S.log 86400"
SSLEngine on
#SSLProtocol -ALL +TLSv1 +TLSv1.1 +TLSv1.2
#SSLHonorCipherOrder on
#SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS"
#SSLCompression off
SSLProtocol -ALL TLSv1.2
SSLCertificateFile "C:/apache/conf/server.cer"
SSLCertificateKeyFile "C:/apache/conf/server.key"
#SSLCertificateChainFile "C:/apache/conf/server-ca.cer"
SSLCACertificateFile "C:/apache/conf/ca.cer"
SSLVerifyClient optional
SSLVerifyDepth 3
<FilesMatch "\.(cgi|shtml|phtml|php)$">
SSLOptions +StdEnvVars
</FilesMatch>
<Directory "C:/apache/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
#CustomLog "|bin/rotatelogs.exe C:/apache/logs/ssl_request.%m-%d-%Y_%H_%M_%S.log 86400" \
# "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
#ProxyPass should be prior to any other Proxy directives
ProxyPass /DocApp https://www2.devDocApp.com/
SSLProxyEngine on
RewriteEngine On
RewriteRule ^/DocApp$ https://www2.devDocApp.com/ [R,L]
RequestHeader set X_SSL_CLIENT_M_SERIAL "%{SSL_CLIENT_M_SERIAL}s"
RequestHeader set X_FORWARDED_PROTO "https" env=HTTPS
RequestHeader set SslSubject "%{SSL_CLIENT_S_DN}s"
</VirtualHost>
When am hitting the proxy apache URL https://devapp01/DocApp/
it is redirecting to https://www2.devDocApp.com/
in the browser, how do I make it work such a way that URL in browser will always be https://devapp01/DocApp/<Page>
for all the nested paths like https://devapp01/DocApp/page1
https://devapp01/DocApp/page2/page1
instead of redirecting to https://www2.devDocApp.com/page1
and https://www2.devDocApp.com/page2
etc.?