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 vote

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,048 views 1 5
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