cvmfs/cvmfs — pull request #479 by DrDaveD (2014-05-31 03:12:06+00:00)
Title: Add geo api to cvmfs-server

This request adds the geo api. It doesn't yet include any documentation, and I haven't written automated tests. I have tested the rpm creation, and guessed at the debian configuration changes but didn't test them because I haven't yet learned to build debian packages. Below are the configuration additions needed in a /etc/httpd/conf.d configuration file. It also requires the mod_wsgi package for this to work. I'm not entirely sure where to document that yet beyond the tech report. Perhaps it could go in the apache config created by cvmfs_server snapshot, but probably commented out because not everybody will use it.

```
RewriteEngine on

# Change api calls to /cvmfs-api internally where it can be easily
# caught by the WSGIScriptAlias below
RewriteRule ^/cvmfs/([^/]+)/api/(.*)$ /cvmfs-api/$1/$2 [PT]

# Enable the api functions
LoadModule wsgi_module modules/mod_wsgi.so
WSGIDaemonProcess cvmfs-api processes=2 display-name=%{GROUP} \
python-path=/usr/share/cvmfs-server/webapi
WSGIProcessGroup cvmfs-api
WSGISocketPrefix /var/run/wsgi
WSGIScriptAlias /cvmfs-api /var/www/wsgi-scripts/cvmfs-api.wsgi

Order allow,deny
Allow from all

```