Install nginx

sudo apt-get install nginx-full

Install gunicorn

sudo apt-get install gunicorn

Install python + virtualenv

TODO: described somewhere else

Switch to web virtualenv

This is done under the user that runs the process.

workon web

Configure nginx

Requests are forwarded to localhost:6010.

  location ~ /wps/?(.*)$ {

    	   proxy_set_header X-Forwarded-Host $host/wps/;
	   proxy_set_header X-Forwarded-Server $host;
	   proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	   proxy_read_timeout 120;

The data (for store enabled processes) is expected to live /data/wps. Turn of auto-index otherwise people can browse eachothers data.

  location /outputwps/ {
           alias /data/wps/;
	   autoindex off;

Use the wsgiwps

Start gunicorn

gunicorn wsgiwps:dispatchWps -b

This should result in a response from server/wps