Running Jira over HTTPS Apache Reverse Proxy

Written by Justin Goetz -

For my job I have to run a Jira application server. This server needs to be run behind a Apache reverse proxy. The apache server needs to be the one serving the HTTPS. Of course, this couldn't be easy, because Jira has to be the most complex, convoluted confusing software I've ever worked with.
For this, after hours of testing, I realized that you need to use Apache's "AJP Proxy". To install, firstly run:
 a2enmod proxy_ajp

This turns the module on in Apache. Next we need a virtualhost config. This config is done the same way that we normally do apache reverse proxies, only instead of http:// we put ajp://.
Example Config: VHOST.txt
Next we need to change the config files of the jira server itself. Follow this part exactly.
1. Stop the Jira server. sudo service jira stop
2. Nano the server file located at /opt/atlassian/jira/conf/server.xml
3. Replace it with the attached config: server.xml
4. Chown JIRA to the proper directories sudo chown -R jira /opt/atlassian/jira/
5. Start jira sudo service jira start This takes up to 7 minutes, so don't think you broke the install
6. Enable the apache VHOST, ensure you can access it from the web browser.