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

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

This widget could not be displayed.
Daniel Wester Community Champion Aug 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.

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?

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 21, 2018 in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

1,327 views 8 11
Read article

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