Bit of a strange one here, maybe someone can help?
I'm using both JIRA (bug tracking) and Confluence (wiki) applications from atlassian and I'm hosting them on my server.
Both of these apps are in fact java apps running on Tomcat.
Now because I want to run both behind the same server (differentiated by different URL paths) and because Tomcat runs on port 8080 by default and because I need it all accessible from default https (443), I've resorted to using Apache2 running on port 443 and using mod proxy.
Idea is the following:
User accesses https://foo.com/jira and this goes to Apache2. Apache2 then proxies to the Tomcat instance running JIRA on, say, port 8080.
At the same time, a user access https://foo.com/wiki and this goes to the same Apache2 instance. However, we now have a different virtualserver which would pick up the /wiki path and proxy redirect to the Tomcat instance running Confluence on port 8090
So we have:
https://foo.com/jira ===> http://localhost:8080/jira and
https://foo.com/wiki ===> http://localhost:8090/wiki
Now I've managed to get it workign with JIRA running on SSL and Confluence running on normal HTTP on port 80. But as soon as I try and have them both running on SSL, it all seems to fall apart.
I don't know whether I need to add a servername or something in apache? my site config files are:
For JIRA:
Code:
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/certs/jira.crt
SSLCertificateKeyFile /etc/apache2/ssl/private/jira.key
SSLCertificateChainFile /etc/apache2/ssl/sf_bundle.crt
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /jira http://foo.com:8080/jira
ProxyPassReverse /jira http://foo.com:8080/jira
</VirtualHost>
And if for Confluence, I have:
Code:
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<VirtualHost *:80>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /wiki http://foo.com:8090/wiki
ProxyPassReverse /wiki http://foo.com:8090/wiki
</VirtualHost>
Then it all works fine.
But if I change the Confluence one to:
Code:
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/certs/jira.crt
SSLCertificateKeyFile /etc/apache2/ssl/private/jira.key
SSLCertificateChainFile /etc/apache2/ssl/sf_bundle.crt
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /wiki http://foo.com:8090/wiki
ProxyPassReverse /wiki http://foo.com:8090/wiki
</VirtualHost>
Then it all falls apart. Both Confluence and JIRA stop working all together.
I have edited the corresponding server.xml config files for Tomcat for both Jira and Confluence instances to reflect back to the correct port (80 or 443). So it's looking like an apache config problem rather than a Tomcat one.
Any apache gurus out there with an idea?