Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Application linking (Jira) with HTTPS nginx Proxy

Rolf Scheuermann
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 11, 2019

Hey,

I cant link Jira to bitbucket, I tried anything.

 

here is my nginx conf

server {
    listen 80 default_server;
    server_name team.hypermesk.de;
    return 301 https://team.hypermesk.de$request_uri;
}

server {
    listen 443 ssl;
    server_name team.hypermesk.de;

    ssl_certificate /etc/nginx/ssl/hypermesk.cer;
    ssl_certificate_key /etc/nginx/ssl/hypermesk.key;

    ssl_session_timeout 5m;
    ssl_protocols       TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers         HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    location / {
        rewrite ^/.* https://$server_name/jira permanent;
    }

    location /jira {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://team.hypermesk.de:8080;
        client_max_body_size 10M;
    }
    location /bitbucket {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://team.hypermesk.de:7990;
        client_max_body_size 10M;
    }
}

 

And here Jira's server.xml

<?xml version="1.0" encoding="utf-8"?>

<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.startup.VersionLoggerListener"/>
<Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on"/>
<Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/>
<Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
<Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/>

<Service name="Catalina">

<Connector port="8080" relaxedPathChars="[]|" relaxedQueryChars="[]|{}^&#x5c;&#x60;&quot;&lt;&gt;"
maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false"
maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443"
acceptCount="100" disableUploadTimeout="true" bindOnInit="false" secure="true" scheme="https"
proxyName="team.hypermesk.de" proxyPort="443"/>


<Engine name="Catalina" defaultHost="localhost">
<Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true">

<Context path="/jira" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
<Resource name="UserTransaction" auth="Container" type="javax.transaction.UserTransaction"
factory="org.objectweb.jotm.UserTransactionFactory" jotm.timeout="60"/>
<Manager pathname=""/>
<JarScanner scanManifest="false"/>
</Context>

</Host>
<Valve className="org.apache.catalina.valves.AccessLogValve"
pattern="%a %{jira.request.id}r %{jira.request.username}r %t &quot;%m %U%q %H&quot; %s %b %D &quot;%{Referer}i&quot; &quot;%{User-Agent}i&quot; &quot;%{jira.request.assession.id}r&quot;"/>
</Engine>
</Service>
</Server> 

 

Bitbucket.properties

server.port=7990
server.secure=true
server.scheme=https
server.proxy-port=443
server.proxy-name=team.hypermesk.de
server.context-path=/bitbucket

 

 

Where is the mistake?  

1 answer

0 votes
Thomas Deiler
Community Champion
February 11, 2019

Dear @Rolf Scheuermann,

what does mean "can't link"? What's the error message or false behavior?

So long

Thomas

Suggest an answer

Log in or Sign up to answer