0

I use Apache as reverse proxy for email web access. Proxy works fine when I connect to login page. I see url email-test.example.com. Unfortunately after login in email server is redirect back to email.example.com(I cant change in email server). So it disconnect me because I need access through proxy server.How can I keep url email-test.example.com ? I suppose I need use mod Rewrite, but I have absolutely no idea how to use it. Thank you

<VirtualHost *:80>
    ServerName email-test.example.com
    Redirect / https://email-test.example.com

</VirtualHost>

<VirtualHost *:443>
    ServerName email-test.example.com
    CustomLog /var/log/httpd/access_email.log combined
    ProxyPass / http://email.example.com/
    ProxyPassReverse / http://email.example.com/
    SSLEngine on
    SSLProtocol all -SSLv2 -SSLv3
    SSLCipherSuite ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
    SSLCertificateFile /etc/pki/tls/certs/localhost.crt
</VirtualHost>
Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47
Ian
  • 1
  • 1
  • From [the documentation](http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypassreverse): To rewrite HTML content to match the proxy, you must load and enable [mod_proxy_html](http://httpd.apache.org/docs/current/mod/mod_proxy_html.html). – Gerald Schneider Jan 19 '18 at 10:52
  • I installed mod_proxy_html and add these two lines: ProxyHTMLEnable On ProxyHTMLURLMap / https://email-test.domain.com And nothing change. What is wrong ? – Ian Jan 19 '18 at 12:23
  • you need to examine the exact method way you get the internal domain back in the url, if it is a redirection, proxypassreverse is the method, and maybe something changes that you haven't specified in your proxypassreverse. If it is inside html content then you need to follow Gerald advice. But first, findout which is the exact case. – Daniel Ferradal Jan 19 '18 at 12:33
  • OK it is for iNote Domino server. Any suggestions ? – Ian Jan 19 '18 at 13:01
  • OK I ask differently. How I can keep URL adress when I connect with 1nd reverse proxy server to 2nd reverse proxy server and on 2nd one is redirect to different adress ? – Ian Jan 19 '18 at 13:51

0 Answers0