Stop Jira, setup the connector inĀ /opt/atlassian/jira/conf/server.xml and start Jira:
1 |
<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" scheme="https" proxyName="jira.hostname.com" proxyPort="443" secure="true"/> |
Don’t forget to comment out usual one. For Stash use:
1 2 3 4 5 6 7 8 9 10 |
<Connector port="7990" protocol="HTTP/1.1" connectionTimeout="20000" useBodyEncodingForURI="true" redirectPort="443" compression="on" compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript" secure="true" scheme="https" proxyName="stash.hostname.com" proxyPort="443" /> |
Setup SSL VirtualHost on Apache (i.e. /etc/apache2/sites-available/ssl-jira.hostname.com.conf):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
<IfModule mod_ssl.c> <VirtualHost *:443> ServerAdmin webmaster@localhost ServerName jira.hostname.com DocumentRoot /var/www ErrorLog ${APACHE_LOG_DIR}/error.log LogLevel warn CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined SSLEngine on SSLCertificateFile /etc/ssl/certs/jira.hostname.com.crt SSLCertificateKeyFile /etc/ssl/private/jira.hostname.com.key SSLCertificateChainFile /etc/ssl/certs/jira.hostname.com.ca-bundle <FilesMatch "\.(cgi|shtml|phtml|php)$"> SSLOptions +StdEnvVars </FilesMatch> <Directory /usr/lib/cgi-bin> SSLOptions +StdEnvVars </Directory> BrowserMatch "MSIE [2-6]" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown <Proxy *> Order deny,allow Allow from all </Proxy> ProxyRequests Off ProxyPreserveHost On ProxyPass / http://localhost:8080/ #7990 for Stash, 8090 for Confluence ProxyPassReverse / http://localhost:8080/ #7990 for Stash, 8090 for Confluence <Location /> Order allow,deny Allow from all </Location> </VirtualHost> </IfModule> |
Enable modules and SSL site and restart apache:
1 2 3 |
a2enmod proxy_http ssl a2ensite ssl-jira.hostname.com service apache2 restart |