Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Install nginx

Code Block
sudo apt-get install nginx-full

Install gunicorn

Code Block
sudo apt-get install gunicorn

Install python + virtualenv

Code Block
TODO: described somewhere else

Switch to web virtualenv

This is done under the user that runs the process.

Code Block
workon web

Configure nginx

Requests are forwarded to localhost:6010.

Code Block
  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;
	   proxy_pass http://127.0.0.1:6010/$1$is_args$args;
    }

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

Code Block
  location /outputwps/ {
           alias /data/wps/;
	   autoindex off;
  }

Use the wsgiwps

Code Block
https://github.com/jachym/PyWPS/blob/master/webservices/wsgi/wsgiwps.py

Start gunicorn

Code Block
gunicorn wsgiwps:dispatchWps -b 127.0.0.1:6010

This should result in a response from server/wps