Apache Server: /jira and /confluence with ProxyPass force over https

Hey atlassian friends,

i run jira and confluence on a server and use ProxyPass to route this via Apache to WWW:

<VirtualHost xx.xx.xx.xx:80>
[...]
ProxyPass /confluence http://localhost:8090/confluence
ProxyPassReverse /confluence http://localhost/confluence
ProxyPass /jira http://localhost:8090/jira
ProxyPassReverse //jira http://localhost:8090/jira
[...]
</VirtualHost>

Now i got a certificate for ssl. I can access my website in general via https://... - this works now (through a <virtualhost xxxx:443>).

What i want to do now is, that every traffic for jira and confluence is delivered over https.

I though of a redirect rule with a pattern that locates /jira or /confluence in the url. How do i do this?

Thanks,

Sebastian

1 answer

Hi Sebastian,

There are more than one way to do this redirection. See this doc for more details.

Cheers

Hey Tiago,

thanks for your repley. Yes, i found also this side. This looks good here:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

But the problem is, that i'm not sure about the rule! If i unserstand this correctly than every traffic is redirected over https. But i also want to redirect everything where the URL is www.domain.com/jira or www.domain.com/confluence. I tried something like this from an example i found with google:

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule *.(confluence|jira)/?$
https://${SERVER_NAME}%{REQUEST_URI}

But apache2ctl told me that the third line is wrong. I also tried to figured out in the rewrite docs (http://httpd.apache.org/docs/2.2/rewrite/intro.html) but i'm not sure whats wrong here...

Thanks!

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

2,933 views 12 18
Join discussion

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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot