Confluence behing Apache SSL mod_proxy

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

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

Okay. I'll try later this evening. Thanks!

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

Hi Chris,

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

Best regards,

Felipe Alencastro

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>


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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Monday in Confluence

Calling all marketing teams who use Confluence - we want to hear from you!

Hi Community! me again 🙂 If you’re a marketing team using Confluence, we want to hear your story! How did you start using Confluence? What are your use cases? What have been some of the benefits?...

181 views 3 3
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you