Archive for June, 2011

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

2 Comments

Get public IP from Linux CLI

Quick way to find your public IP address from a Linux command prompt:

wget -O - -q icanhazip.com

1 Comment