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

0 votes
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 Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

451 views 6 9
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