Skip to content
This repository
Browse code

edit

  • Loading branch information...
commit ee763d83cdf659a1684470a1bb7374002bed676b 1 parent 3058e89
吼吼 / Chao Shen ohsc authored anandology committed

Showing 1 changed file with 30 additions and 0 deletions. Show diff stats Hide diff stats

  1. +30 0 cookbook/mod_wsgi-nginx.zh-cn.md
30 cookbook/mod_wsgi-nginx.zh-cn.md
Source Rendered
... ... @@ -0,0 +1,30 @@
  1 +---
  2 +layout: default
  3 +title: deploying web.py with nginx and mod_wsgi
  4 +---
  5 +
  6 +# deploying web.py with nginx and mod_wsgi
  7 +
  8 +It is possible to deploy web.py with nginx using a mod_wsgi similar to the module for Apache.
  9 +
  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):
  11 +
  12 +
  13 + wsgi_python_executable /usr/bin/python;
  14 +
  15 + server {
  16 + listen 80;
  17 + server_name www.domain_name.com domain_name.com;
  18 + root /path/to/your/webpy;
  19 +
  20 + include /etc/nginx/wsgi_vars;
  21 + location / {
  22 + wsgi_pass /path/to/your/webpy/app.py;
  23 + }
  24 + }
  25 +
  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.
  27 +
  28 +Helpful links:<br />
  29 +[ nginx website](http://nginx.net/ )<br />
  30 +[ wiki page on mod_wsgi](http://wiki.codemongers.com/NginxNgxWSGIModule )

0 comments on commit ee763d8

Please sign in to comment.
Something went wrong with that request. Please try again.