您的位置:首页 > 运维架构 > Nginx

Web.py Cookbook 简体中文版 - deploying web.py with nginx and mod_wsgi

2012-11-23 11:11 477 查看
t 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:
nginx website
wiki page on mod_wsgi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: