JIRA with Apache2 and SSL

Responding to a question from AAC. This worked well for me using Ubuntu 10.04 LTS.

sudo aptitude -y install apache2 apache2-mpm-worker libapache2-mod-proxy-html libapache2-mod-jk
sudo a2enmod ssl proxy_ajp rewrite
sudo vi /etc/apache2/mods-enabled/jk.conf

JkWorkersFile /etc/apache2/workers.properties

sudo vi /etc/apache2/sites-available/jira

NameVirtualHost <ipaddress>:443
<VirtualHost <ipaddress>:443>
        ServerAdmin webmaster@localhost
        ServerName <FQDN>
        SSLEngine On
 
        SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
        SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
 
        JkMount / jira
        JkMount /* jira
 
        JkLogLevel info
        JkLogFile /var/log/apache2/jira_jk.log
 
</VirtualHost>

sudo vi /etc/apache2/workers.properties

worker.list=jira
 
worker.jira.host=localhost
worker.jira.port=8006
worker.jira.type=ajp13

sudo vi /etc/apache2/sites-available/default and add to the bottom:

RewriteEngine   on
RewriteCond     %{SERVER_PORT} ^80$
RewriteRule     ^(.*)$ https://%{SERVER_NAME}$1 [L,R]

sudo vi /opt/jira/conf/server.xml

<Connector port="8006"
    enableLookups="false" protocol="AJP/1.3" minSpareThreads="5" maxThreads="256" URIEncoding="UTF-8" />

sudo a2ensite jira
sudo /etc/init.d/apache2 restart

Advertisements
  1. #1 by mbrinson on August 9, 2011 - 3:46 am

    I’ve set server up with Jira and Confluence in two separate tomcat instances (standalone version for each) and have set it up with SSL terminating to Apache and then using proxypass and proxypassreverse directives to send the /jira and /confluence to their respective tomcat workers.

    However, I am having a problem with setting up application links between Jira and Confluence because I have Jira and Confluence talking http between each other, but the “server base url” includes https and so I think the application link rewrites it to include the https internally and then the workers aren’t set up to handle ssl internally.

    I was curious to know if using your method (described in your post) you’re able to get application links working without issues between confluence and jira. My end goal is:

    https://mydomain.com/jira -> Jira tomcat instance
    https://mydomain.com/confluence -> Confluence tomcat instance

    Application links working between Jira and Confluence via plain http communication.

    Would the method you’re describing work for that or have you already got it set up that way?

    Thanks for any feedback you might have!

    • #2 by Justin on August 10, 2011 - 2:46 am

      I would check out the Here Be Dragons tutorial for specific help on setting up the Application Links.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: