Permalink
Browse files

edit

  • Loading branch information...
1 parent 3058e89 commit ee763d83cdf659a1684470a1bb7374002bed676b @ohsc ohsc committed with anandology Jan 20, 2010
Showing with 30 additions and 0 deletions.
  1. +30 −0 cookbook/mod_wsgi-nginx.zh-cn.md
@@ -0,0 +1,30 @@
+---
+layout: default
+title: deploying web.py with nginx and mod_wsgi
+---
+
+# deploying web.py with nginx and mod_wsgi
+
+It is possible to deploy web.py with nginx using a mod_wsgi similar to the module for Apache.
+
+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):
+
+
+ wsgi_python_executable /usr/bin/python;
+
+ server {
+ listen 80;
+ server_name www.domain_name.com domain_name.com;
+ root /path/to/your/webpy;
+
+ include /etc/nginx/wsgi_vars;
+ location / {
+ wsgi_pass /path/to/your/webpy/app.py;
+ }
+ }
+
+*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.
+
+Helpful links:<br />
+[ nginx website](http://nginx.net/ )<br />
+[ wiki page on mod_wsgi](http://wiki.codemongers.com/NginxNgxWSGIModule )

0 comments on commit ee763d8

Please sign in to comment.