Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Confluence behing Apache SSL mod_proxy

chris hoerske May 26, 2014

I have an Apache install running in mod_proxy mode. JIRA and Confluence are behind it. At first I had the proxy and both JIRA/Confluence running on HTTP. It worked perfect. Today I installed a SSL cert on my Apache install and setup Apache to use HTTPS and talk to JIRA via HTTP. I tried to do the same thing with Confluence but for some reason it keeps on redireting back to HTTP. So, If I go to https://atlassian.mydomain.com/JIRAit stays on HTTPS. If I go to https://atlassian.mydomain.com/confluence it redirects to HTTP. Not sure if this matters but my Apache SSL config is in /etc/httpd/conf.d/ssl.conf and not in /etc/httpd/conf/httpd.conf

Any ideas?

2 answers

1 vote
FelipeA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2014

Hi Chris,

I'm seeing two connectors for the same port (8090) on your server.xml. Please try removing the last one:

<Connector port="8090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" disableUploadTimeout="true"
acceptCount="100" URIEncoding="UTF-8" proxyName="host.mydomain.com" proxyPort="443" scheme="https" />

And adding the proxy related configurations to the first connector:

proxyName="host.mydomain.com" proxyPort="443" scheme="https"

Also, did you recall of touching your web.xml file? In there you can set some redirect rules, that might be your case.

Best regards,

Felipe Alencastro

chris hoerske June 2, 2014
Okay. I'll try later this evening. Thanks!
William Crighton _CCC_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 22, 2014

Felipe,

That was my first thought when I saw this one unanswered - there was an old, or an absent, proxyName setting in the connector for Confluence tomcat.

The way I learned about this was quite traumatic and managed to sear the troubleshooting step into my central cortex. Nothing quite like going live with a client and after you bring up their new global site it redirect all traffic back to you company's site...

-wc

0 votes
FelipeA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2014

Hi Chris,

Please paste here your mod_proxy configuration, along with the server.xml from your Confluence server.

Best regards,

Felipe Alencastro

chris hoerske May 28, 2014

Confluence server.xml

<Server port="8000" shutdown="SHUTDOWN" debug="0">
<Service name="Tomcat-Standalone">
<Connector className="org.apache.coyote.tomcat4.CoyoteConnector" port="8090" minProcessors="5"
maxProcessors="75"
enableLookups="false" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="20000"
useURIValidationHack="false" URIEncoding="UTF-8" />

<Engine name="Standalone" defaultHost="localhost" debug="0">

<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true" autoDeploy="false">

<Context path="/confluence" docBase="../confluence" debug="0" reloadable="true" useHttpOnly="true">
<!-- Logger is deprecated in Tomcat 5.5. Logging configuration for Confluence is specified in confluence/WEB-INF/classes/log4j.properties -->
<Manager pathname="" />
</Context>
</Host>

</Engine>

<!--
To run Confluence via HTTPS:
* Uncomment the Connector below
* Execute:
%JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
$JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
with a password value of "changeit" for both the certificate and the keystore itself.
* Restart and visit https://localhost:8443/<br< a="">>
For more info, see
http://confluence.atlassian.com/display/DOC/Adding+SSL+for+Secure+Logins+and+Page+Security<br< a="">> -->

<Connector port="8090" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" disableUploadTimeout="true"
acceptCount="100" URIEncoding="UTF-8" proxyName="host.mydomain.com" proxyPort="443" scheme="https" />

</Service>
</Server>


chris hoerske November 24, 2014

Does anyone have any suggestions? It still doesn't work. When trying to access confluence via HTTPS it redirects to HTTP. My JIRA install works perfectly.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events