HTTPS port 443 to port 8443 redirection

Hi all -
Here is another HTTPS port redirection question..
I've found a couple on here that have been answered already, but aren't quite delivering the result I'm looking for.

Server info:
Ubuntu 13.04 server x64
Jira 6.1 (using installer bin)
Apache2 -> for mod_redirect
Jira configured for HTTP & HTTPS (redirect)

Desired result:
User goes to and gets redirected to
Service to be running on 8443 (as cannot run on 80/443 unless root)
Base URL to be set to for linking, etc

Current results:
User goes to and is redirected to, launching JIRA.
User goes to and no page is displayed.
When logged in to JIRA console, notification bar alerts that the base domain is set to yet we are accessing from

Below is my server.xml and httpd.conf sections that have been edited to attempt to get the desired redirect.

I have attempted to use rinetd with no success, and it doesn't appear iptables is configured in this version of ubuntu (additionally I have read elsewhere not to use iptables for this anyway.)

Please let me know if you have any suggestions to alternative methods / see any errors in my configurations below.

Many thanks!



<Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" maxHttpHeaderSize="8192" maxThreads="150" minSpareThreads="25" port="8080" protocol="HTTP/1.1" redirectPort="8443" useBodyEncodingForURI="true" proxyName="" proxyPort="80" />

<Connector SSLEnabled="true" acceptCount="100" clientAuth="false" connectionTimeout="20000" disableUploadTimeout="true" enableLookups="false" keyAlias="jira" keystoreFile="/opt/atlassian/jira/jira.jks" keystorePass="fafdfr3qrvzfffdfsagfgg" keystoreType="JKS" maxHttpHeaderSize="8192" maxSpareThreads="75" maxThreads="150" minSpareThreads="25" port="8443" protocol="org.apache.coyote.http11.Http11Protocol" scheme="https" secure="true" sslProtocol="TLS" useBodyEncodingForURI="true"/></Service>


LoadModule proxy_module /usr/lib/apache2/modules/
LoadModule proxy_http_module /usr/lib/apache2/modules/

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
    Order deny,allow
    Allow from all

ProxyPass /
ProxyPassReverse /

<Location />
    Order allow,deny
    Allow from all

LoadModule ssl_module /usr/lib/apache2/modules/

<VirtualHost *:443>
    SSLProxyEngine On
    SSLProxyCheckPeerCN on
    SSLProxyCheckPeerExpire on
    ProxyPass /
    ProxyPassReverse /

3 answers

You can write a filter in web.xml of WEB-INF. This filter can redirect all the url coming on 443 to 8443

Are you able to provide an example? My experience with this is quite limited..

Effectively, the only thing required is for JIRA to accept connections on :443..
if there is a way (other than mapping to 443 as a root user) for this to occur without simply redirecting the address to :8443 (as this will still alert as an incorrect baseurl) - that would be fantastic.













u can write public class HttpsFilter implements Filter and implements doFilter

In the void function rewrite the url with required port. then it should work.

we are using the method to auto redirect to https , when employee is trying to access with http

Hope this may help you.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,516 views 15 20
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