For this test I redirected firewall ports 80 and 443 to proxy server (172.23.93.248, normally it is directed to mailserver).
Using a browser on laptop connected to mobile hotspot I used https://office.company.com. Before firewall change this would get me directly to mailserver. Because of the change, it is being directed to proxy server.
The proxy server should proxy for mailserver. The browser gets error INET_E_REDIRECT_FAILED. Domlog shows this.
=============
HTTP Request:
Server Address: webmail.company.com
Date: 10/03/2017 01:05:55 PM
User Address: 172.23.93.248 (this is the proxy server)
Authenticated User: -
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
Cookie:
Request: GET / HTTP/1.1
Status: 302 FOUND (The data requested has a different URL temporarily)
Content Length: 0 bytes
Content Type:
Process Time: 0 ms
Error:
Translated URI:
Translated Request: webmail.company.com/
Decoded Query:
Referring URL:
Decoded Query:
=================
The Apache configuration for the site is this, where office is the proxy server, and webmail is mailserver on Domino server.
ProxyRequests off
SSLSessionCache "shmcb:logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost office.company.com:443>
# Site info
ServerName office.company.com
ServerAlias office.company.com
ServerAdmin root@company.com
# Rewrite engine on
RewriteEngine On
RewriteOptions Inherit
# Enable SSL
SSLEngine On
SSLProxyEngine On
SSLCertificateFile /etc/pki/tls/certs/company.crt
SSLCertificateKeyFile /etc/pki/tls/private/company.key
# Log filenames
ErrorLog /var/log/httpd/error-inotes-redirect
CustomLog /var/log/httpd/access-inotes-redirect common
LogLevel warn
# The iNotes Specific configurations comes after this line
# Rule 1: Read domino server name from first access to the mail
# directory, save it to the cookie and redirect to the mail server
RewriteCond %{REQUEST_URI} ^/(.*)/mail
RewriteRule /(.*)/mail/(.*) http://$1.company.com/mail/$2 [P,CO=iNotesServer:$1:.company.com]
# Rule 2: If cookie is set, use it to rewrite rules for iNotes generated
# URLs for the server defined in the cookie iNotesServer
RewriteCond %{REQUEST_URI} ^/
RewriteCond %{HTTP_COOKIE} ^.*iNotesServer=([^;]+)
RewriteRule /(.*) http://%1.company.com/$1 [P]
# Rule 3: if no cookie set, on first access on the iNotes iwaredir.nsf
RewriteCond %{REQUEST_URI} ^/
RewriteRule /(.*) http://webmail.company.com/$1 [P]
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
ProxyPassReverse /webmail/mail/ http://webmail.company.com/mail/
ProxyPassReverse / http://webmail.company.com/
</VirtualHost>
Thank you,
Durwin