I want to set up and configure my production machine to redirect requests for the old JIRA URL(http://Servername1:8080/secure/Dashboard.jspa) to the new host(http://servername2/secure/Dashboard.jspa).
( Before getting into production, I wanted to try on Local machine... http://localhost:8080(JIRA) to (http:/servername2/secure/Dashboard.jspa).
Can you please assist me how to perform redirection in JIRA?
Thanks,
Lakshmi
To add some insight that kept me doing it wrong for years:
Let apache do your SSL termination, don't implement SSL cert on JIRA itself, meaning:
Client HTTP -> Apache port 80 -> Apache port 443 -> JIRA port 8080
in /etc/apache2/sites-available/jira.conf:
<VirtualHost *:80> ServerName jira.fully.qualified.domain.name ServerAlias jira.fully.qualified.domain.name jira <Directory /> UseCanonicalName DNS AllowOverride None Order allow,deny allow from all RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://jira.fully.qualified.domain.name%{REQUEST_URI} [R,L] </Directory> </VirtualHost> <VirtualHost *:443> ServerName jira.fully.qualified.domain.name ServerAlias jira.fully.qualified.domain.name jira SSLProxyEngine on ProxyRequests Off ProxyPreserveHost On ProxyPass / http://jira.fully.qualified.domain.name:8081/ keepalive=On ProxyPassReverse / http://jira.fully.qualified.domain.name:8081/ ErrorLog /var/log/apache2/jira_ssl_error_log MaxKeepAliveRequests 500 KeepAlive On SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /home/jira/jira.crt SSLCertificateKeyFile /home/jira/jira.key SSLProxyVerify none SSLProxyCheckPeerCN off SSLProxyCheckPeerName off </VirtualHost>
Make sure you use alt_names in your openssl.cnf covering both FQDN and shortnames, real servernames and any other url you might access JIRA from.
Disable gzip http compression.
Set FQDN as server name.
In your server.xml:
<Connector port="8081" maxThreads="150" minSpareThreads="25" connectionTimeout="20000" enableLookups="false" maxHttpHeaderSize="8192" protocol="HTTP/1.1" useBodyEncodingForURI="true" redirectPort="8443" acceptCount="100" disableUploadTimeout="true" proxyName="jira.fully.qualified.domain.name" proxyPort="443" scheme="https" keyAlias="jira" keystoreFile="/opt/atlassian/application-data/jira-prod/cacerts" keystorePass="keystore password goes here" />
Further down in you server.xml (to remove the /JIRA or /atlassian-jira):
<Context path="" docBase="${catalina.home}/atlassian-jira" reloadable="false" useHttpOnly="true">
Good luck, this most basic feature is completely unsupported by Atlassian.
Use Apache to do the redirection. See https://httpd.apache.org/docs/2.4/rewrite/remapping.html for some details.
You can also find confluence redirection using apache at https://confluence.atlassian.com/doc/using-apache-with-mod_proxy-173669.html. JIRA is going to be pretty much the same.
I apologies for the late response. I used the Apache for redirection using rewrite model. it works!!!!!!!!!
Thank you so much for the support & Help.
Hi Lakshmi,
Can you please help me to provide the steps followed for redirecting JIRA URL??
I'm using the rewrite model, but seems to be not helping.
If the folder name or file names you can provide. IT'll help. Thanks.
Try this
Uncomment the following line on your httpd.conf or apache2.conf
httpd.conf
apache2.conf
LoadModule proxy_module modules/mod_proxy.soLoadModule proxy_http_module modules/mod_proxy_http.so
Add following line for reverse proxy.
<VirtualHost *:80>ServerName Servername1ProxyPass / http://servername2/ProxyPassReverse / http://servername2/</VirtualHost>
Replace Servername1 with the hostname or IP address of your old JIRA server and servername2 with the hostname or IP address of your new JIRA server. Adjust the port number if necessary. Save it and restart hope this setting will workout
Servername1
servername2
additionally you can verify and get detail redirection chain with any online tool such as redirectchecker.com to get detail information about url.
It looks like you're new here. Sign in or register to get started.