很多朋友喜欢python,学习python,推荐一个url:http://www.open-open.com/lib/tag/Python ,增广你的见识,让你将python应用的更好。
例如:如何配置 python的web运行的uWSGI 与NGINX 一起运行:
http {
upstream django {
server 127.0.0.1:5001;
}
server {
listen 5000 default_server;
server_name _;
root /var/www/myapp/html;
location / {
index index.html;
}
location /static/ {
alias /var/flask/projects/myapp/static/;
}
location /main {
include /etc/nginx/uwsgi_params;
uwsgi_pass unix:/tmp/flask.sock;
uwsgi_param Host $host;
uwsgi_param X-Real-IP $remote_addr;
uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;
}
}
}
2260

被折叠的 条评论
为什么被折叠?



