stash SSL setup with apache proxy my https url goes to confluence not stash

paulwade August 18, 2015

Hey guys. I have JIRA,Confluence, stash, and bamboo all up and running. I needed to add https to stash for git. I followed the instructions but when I go to stash.psibitsoftware.com i am sent to the confluence login page.

here is my apache config

 

# Put this with your other VirtualHosts, or at the bottom of the file

<VirtualHost *:443>
ServerName stash.psibitsoftware.com
ProxyPreserveHost On
ProxyRequests Off
SSLEngine On
SSLCertificateFile "/usr/local/apache2/conf/server.crt"
SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"
SSLCertificateChainFile "/usr/local/apache2/conf/server.crt"
<Proxy *:443>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://atlassianstack.cloudapp.net:7990/
ProxyPassReverse / http://atlassianstack.cloudapp.net:7990/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>


<VirtualHost *:80>
ServerName confluence.psibitsoftware.com

ProxyRequests Off
<Proxy *:80>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://atlassianstack.cloudapp.net:8090/
ProxyPassReverse / http://atlassianstack.cloudapp.net:8090/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>

<VirtualHost *:80>
ServerName bamboo.psibitsoftware.com

ProxyRequests Off
<Proxy *:80>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost On
ProxyPass / http://atlassianstack.cloudapp.net:8085/
ProxyPassReverse / http://atlassianstack.cloudapp.net:8085/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>
<VirtualHost *:80>
ServerName jira.psibitsoftware.com
ProxyPreserveHost On
1,1 Top

1 answer

0 votes
Daniel Wester
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 18, 2015

It's because you've got stash using http so (port 443) and all of the others on port 80. Apache is using the best match it can find (which is the first virtual server on port 80). I'd set up a vserver for stash on port 80 and have it redirect to https.

paulwade August 18, 2015

I guess what I'm struggling with here is the vhost for stash is <VirtualHost *:443> so if something comes in as https shouldn't apache be choosing that.. the only host on 443?

paulwade August 18, 2015

also I should have said I am going to https://stash.psibitsoftware.com

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events