Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

https faild; redirect to http

Sarah Kirchner November 14, 2012

I Stash is installed on a remote server that is accessed via Apache (proxy).

Under https://example.com/stash want the server to be accessible. Calling the URL I will reflect back at http://example.com/stash/login, but there is no stash installed.

Apache:

<VirtualHost example.com:443>

  SSLEngine On
  SSLCertificateFile /etc/apache2/ssl/apache.crt
  SSLCertificateKeyFile /etc/apache2/ssl/apache.key
  ServerSignature Off

  # Atlassian Stash Configuration
  ProxyPass        /stash http://localhost:7990/stash connectiontimeout=5 timeout=300
  ProxyPassReverse /stash http://localhost:7990/stash

</VirtualHost>


Tomcat (conf/server.xml)

...
<Service name="Catalina">
...
     <Connector port="7990"
                protocol="HTTP/1.1"
                connectionTimeout="20000"
                useBodyEncodingForURI="true"
                redirectPort="443"
                compression="on"
                compressableMimeType="text/html,text/xml,text/plain,text/css,...
                secure="true"
                schema="https"
                proxyName="developer.kirchnerei.de"
                proxyPort="443"/>

...

            <Host name="localhost" appBase="webapps"
                  unpackWARs="true" autoDeploy="true"
                  xmlValidation="false" xmlNamespaceAware="false">
...
               <Context path="/stash"
                         docBase="${catalina.home}/atlassian-stash"
                         reloadable="false"
                         useHttpOnly="true"/>
...
            </Host>


...
</Service>

How to config Stash to access only over https?
Thanks

2 answers

1 accepted

0 votes
Answer accepted
Michael Heemskerk
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 15, 2012

Hi Mulder,

Under https://example.com/stash want the server to be accessible. Calling the URL I will reflect back athttp://example.com/stash/login, but there is no stash installed.

This tells me that your Apache server is configured correctly, but Tomcat seems to think it's running on http, not https. You can confirm this by opening https://developer.kirchnerei.de/stash/login directly. If a Stash page shows up, it confirms that the Apache configuration is fine. When you actually login, Stash will redirect you to http://developer.kirchnerei.de/stash/projects which will not work (because of the http instead of https).

Your Tomcat configuration looks fine; we're using the same configuration internally for our Stash dogfooding server. Are you sure you're modifying the correct server.xml? If you're running Stash from the bundled Tomcat server, it should be the STASH_INST/conf/server.xml.

Cheers,

Michael

Sarah Kirchner November 20, 2012

Hi Michael,

thanks for your answer. I reinstall stash again and I use the Documentation https://confluence.atlassian.com/display/STASH/Integrating+Stash+with+Apache+HTTP+Server.

And magic ... I got it to run...

Cheers,

Sarah

0 votes
PauloP
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.
November 14, 2012

Hi Mulder

If Apache is the front-end server, all you have to do is keep this configuration and do not configure the "<Vistualhost> " settings for port 80 (clear text).

However, if you might having the following settings, you should change the Stash setting in order to bind a SSL port too, installing a new certiicate and so on. For further details, please use the following page as your guideline.

Envrionment:

Client Browser --> HTTPS --> Apache proxy --> HTTPS --> Tomcat/STASH

For further details:

https://confluence.atlassian.com/display/STASH/Securing+Stash+with+HTTPS

Cheers,

Paulo Renato
Sarah Kirchner November 14, 2012

Hi Paulo,

I am sorry, but I need more information.

There are 2 help documents

But I can find the solution. do you have a example configuration?

Thanks a lot

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events