Neptune Apache Configuration

Apache2 was pre-installed on neptune. Apache2 config is customised by SUSE making it a little alien if uninitiated.

To restart following changes:

$ /etc/init.d/apache2 restart

Virtual Hosts

SUSE's Apache2 config layout allows for dedicated virtual host conf files under /etc/apache2/vhosts.d but the main virtual host entry is currently in /etc/apache2/httpd.conf. TODO: move into /etc/apache2/vhosts.d/vhost.conf.


Nb. mod_wsgi 2.3 has not been upgraded to 2.4 because there is an issue with running the 4Suite package with mod_wsgi 2.4. As of today 11/05/2009 this is fixed. See: TODO: upgrade to 2.5

Install mod_wsgi from source:

tar -xzvf mod_wsgi-2.3.tar.gz
cd mod_wsgi-2.3
./configure --with-apxs=/usr/sbin/apxs2-prefork 
sudo make install
make clean 

Alter Apache to load wsgi module:

$ a2enmod wsgi

This appends to the list in /etc/sysconfig/apache2:

APACHE_MODULES="authz_host actions alias auth_basic authz_groupfile authn_file authz_user autoindex cgi dir include log_config mime negotiation setenvif status userdir asis imagemap php5 perl python authz_default mod_proxy mod_proxy_http mod_proxy_connect wsgi"

Edited /etc/apache2/httpd.conf adding mod_wsgi settings. Nb. Python path:

WSGIDaemonProcess cows processes=2 threads=15 display-name=%{GROUP} python-path=/usr/local/cowsenv/eggs:/usr/local/cowsenv/lib/python2.5/site-packages/
WSGIProcessGroup cows
WSGIRestrictStdout Off

Added WSGI scripts directory:

sudo mkdir /srv/www/wsgi_scripts

in /etc/apache2/httpd.conf (Nb. restricted access to with RAL site):

<Directory /srv/www/wsgi_scripts/>
Order allow,deny
Allow from

Added COWS WSGI script /srv/www/wsgi_scripts/cowswxs.wsgi:

APP_CONFIG = "/usr/local/cowsenv/services/OGCTestbed/development.ini"

from paste.deploy import loadapp
import os
application=loadapp("config:" + APP_CONFIG)

TODO: change to zc.buildout based approach using the WSGI buildout recipe  collective.recipe.modwsgi

Added script alias to /etc/apache2/httpd.conf:

#COWS pylons app WSGI
WSGIScriptAlias /cows /srv/www/wsgi_scripts/cowswxs.wsgi

Modified apache group:

User wwwrun
Group byacl

To enable access to datasets by Apache server.


See for reference.

Enable mod_ssl:

$ a2enmod ssl

Set SSL flag:

$ a2enflag SSL

Settings are in /etc/apache2/vhosts.d/vhost-ssl.conf copied from the template:

$ cp /etc/apache2/vhosts.d/vhost-ssl.template /etc/apache2/vhosts.d/vhost-ssl.conf

Certificate and private key in the default config are placeholders only. These have been replaced with a key and cert issued from the SimpleCA on glue under the globus account.

Restart Apache2 - see top.