KB: Running Mingle behind Apache with SSL on Ubuntu

Configuration guide for running Mingle behind Apache with SSL on Ubuntu Linux.

Contents

Overview

This guide was created to document the process of running ThoughtWorks Mingle behind Apache with SSL. This guide assumes that Mingle has been installed to /opt/mingle and Apache is already configured for SSL and running. The final result is the ability to access Mingle from the following URL:

https://mingle.mysite.com

This configuration has been tested on Ubuntu 8.04 LTS running Apache 2.2.8 and Mingle 2.2.

MOD_JK Configuration

1. Install mod_jk from libapache-mod-jk:


sudo apt-get install libapache-mod-jk

2. Create file /etc/apache2/mods-available/jk.load:

LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so

3. Create file /etc/apache2/worker.properties:


worker.list = worker1

worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300

4. Create file /etc/apache2/mods-available/jk.conf:


# mod_jk configuration

JkWorkersFile /etc/apache2/worker.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel error
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat "%w %V %T"
#JkMount /*.jsp worker1

5. Create the following links in /etc/mods-enabled:


ln -s /etc/apache2/mods-available/jk.load jk.load
ln -s /etc/apache2/mods-available/jk.conf jk.conf

6. Append this section to the end of /etc/apache2/sites-available/mysite:

  
<virtualhost *:443>
        ServerName mingle.mysite.com
        ServerAdmin webmaster@mysite.com

        SSLEngine On
        SSLCertificateFile /etc/apache2/ssl/mysite.pem

        JkMount /* worker1

        ErrorLog /var/log/apache2/mingle.error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/mingle.access.log combined
        ServerSignature On
</virtualhost>

Note: For help configuring Apache to use SSL, see this guide.

7. Restart Apache:


sudo /etc/init.d/apache2 restart

AJP Configuration

1. Add the following section /opt/mingle/config/jetty.xml:


      8009

2. Restart Mingle:


/opt/mingle/MingleServer stop
/opt/mingle/MingleServer start

Startup Script

To start Mingle at boot time, add the following script to /etc/init.d:


#! /bin/sh
#
# Keith Davis - 03/14/2007
# ADD: update-rc.d mingle.sh defaults
# REMOVE: update-rc.d mingle.sh remove
# /etc/init.d/mingle.sh: start and stop Mingle

# Startup notes:
# 1>>/dev/null redirects stdout
# 2>>/dev/null redirects stderr
# 0>&- closes stdout
# final & puts process in background

test -f /lib/lsb/init-functions || exit 1
. /lib/lsb/init-functions

case "$1" in
start)
log_begin_msg "Starting Mingle..."
su mingle -c 'cd /opt/mingle; ./MingleServer start 1>>/dev/null 2>>/dev/null 0>&- &'
log_end_msg 0
;;
stop)
log_begin_msg "Stopping Mingle..."
su mingle -c 'cd /opt/mingle; ./MingleServer stop 1>>/dev/null 2>>/dev/null 0>&- &'
log_end_msg 0
;;
*)
log_success_msg "Usage: /etc/init.d/mingle.sh {start|stop}"
exit 1
esac

exit 0

To Top

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *