Hi,
I recently installed Confluence 6 with an Apache server frontending the communication. I was following the instructions at https://confluence.atlassian.com/confeap/using-apache-with-mod_proxy-480346967.html and found them to be a bit inaccurate, so I thought I would publish my discovery.
In our configuration, we have the server url "https://confluence.company.com" which is hosted by Apache and backended with Confluence on the same server at port 8090. The instructions talk about always having a context path - and I found that Example 2: Complex configuration without context path sort of described my scenario; however, it didn't work. There are two issues. First, the proxypath and proxypathrevers parameters should be pointing to the root "/" rather than "/confluence". Second, the parameters for the ProxyHTMLURLMap are backwards. Lastly, when in practice, I found the ProxyHTMLURLMap was not processing all of the urls.
What I did try was not setting a context in the tomcat configuration, then using the config below and that seems to be working fine.
<VirtualHost _default_:443>
ServerAdmin scott_selberg@keysight.com
ServerName confluence.keysight.com
ErrorLog "|/usr/sbin/cronolog /var/log/httpd/%Y/%m/ssl_error_log.%Y%m%d"
TransferLog "|/usr/sbin/cronolog /var/log/httpd/%Y/%m/ssl_access_log.%Y%m%d"
CustomLog "|/usr/sbin/cronolog /var/log/httpd/%Y/%m/ssl_custom_log.%Y%m%d" combined
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
SSLCertificateFile <redacted>
SSLCertificateChainFile <redacted>
SSLCertificateChainFile <redacted>
SSLCertificateChainFile <redacted>
SSLCertificateKeyFile <redacted>
ProxyRequests Off
ProxyPreserveHost On
<Proxy "*">
Require all granted
</Proxy>
<Location />
Require all granted
</Location>
ProxyPass /synchrony http://localhost:8091/synchrony
<Location /synchrony>
Require all granted
RewriteEngine on
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule .* ws://localhost:8091%{REQUEST_URI} [P]
</Location>
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
Alias "/video" "/confluence_videos"
<Directory "/confluence_videos">
Options +Indexes
Require all granted
SSLOptions +StdEnvVars
</Directory>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/video
RewriteCond %{REQUEST_URI} !^/icons
RewriteCond %{REQUEST_URI} !^/keysight
RewriteCond %{REQUEST_URI} !^/notices
RewriteCond %{REQUEST_URI} !^/synchrony
RewriteRule ^/(.*) http://localhost:8090/$1 [P]
ProxyPassReverse / http://localhost:8090
#RewriteRule ^/(.*) /notices/maintenance.html
BrowserMatch "MSIE [2-5]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
</VirtualHost>-Scott