Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 31 lines (21 sloc) 0.955 kb
03cb85b edit
enry authored
1 ---
2 layout: default
7dcfdd4 edit
enry authored
3 title: deploying web.py with nginx and mod_wsgi
03cb85b edit
enry authored
4 ---
5
7dcfdd4 edit
enry authored
6 # deploying web.py with nginx and mod_wsgi
7
03cb85b edit
enry authored
8 It is possible to deploy web.py with nginx using a mod_wsgi similar to the module for Apache.
9
853c265 edit
enry authored
10 After compiling and installing nginx with mod_wsgi, you can easily get a web.py app up and running with the following config* (edit the paths and settings with your own):
03cb85b edit
enry authored
11
12
55ea1fd edit
enry authored
13 wsgi_python_executable /usr/bin/python;
7955583 edit
enry authored
14
55ea1fd edit
enry authored
15 server {
4ee9d14 edit
enry authored
16 listen 80;
17 server_name www.domain_name.com domain_name.com;
f5e4612 Adding ; to code.
Mau authored
18 root /path/to/your/webpy;
03cb85b edit
enry authored
19
7dcfdd4 edit
enry authored
20 include /etc/nginx/wsgi_vars;
21 location / {
f5e4612 Adding ; to code.
Mau authored
22 wsgi_pass /path/to/your/webpy/app.py;
7dcfdd4 edit
enry authored
23 }
55ea1fd edit
enry authored
24 }
9082d5b edit
enry authored
25
9bb7957 edit
enry authored
26 *Note: This is a snippet of the relevant information to setup mod_wsgi for your web app and NOT a full config for running nginx.
9082d5b edit
enry authored
27
6522a45 edit
enry authored
28 Helpful links:<br />
29 [ nginx website](http://nginx.net/ )<br />
a365057 edit
enry authored
30 [ wiki page on mod_wsgi](http://wiki.codemongers.com/NginxNgxWSGIModule )
Something went wrong with that request. Please try again.