Django has officially started to abandon fastcgi to deploy Django applications, as a previously used user, or to post a configuration to commemorate it.
Under the project
#!/bin/sh Case "[email protected]" inchStart) Python manage.py runfcgi host=127.0.0.1port=8400;; Stop) Kill-9' PS Aux|grep runfcgi|grep8400|awk' {print $} '|xargs ';; Restart) Kill-9' PS Aux|grep runfcgi|grep8400|awk' {print $} '|xargs ' sleep1Python manage.py runfcgi host=127.0.0.1port=8400;; *)Echo ' unknown arguments ' Exit 1;;Esac
Nginx Configuration
Server{Listen the;server_name 127.0.0.1;Access_log/var/log/nginx/vsite.access_log;Error_log/var/log/nginx/vsite.error_log; Location^~/media{alias/data/test/vsite/staticfiles; } Location^~/upload{alias/data/test/vsite/uploadfiles; } Location^~/static{alias/data/test/vsite/staticfiles; } Location/ {# Host and port to fastcgi server Fastcgi_pass 127.0.0.1:8401;Fastcgi_paramPath_info$fastcgi _script_name;Fastcgi_paramRequest_method$request _method;Fastcgi_paramQuery_string$query _string;Fastcgi_paramContent_Type$content _type;Fastcgi_paramContent_length$content _length;Fastcgi_pass_headerAuthorization;fastcgi_intercept_errors off;Fastcgi_paramRemote_addr$remote _addr;Fastcgi_paramServer_addr$server _addr;Fastcgi_paramServer_port$server _port;Fastcgi_paramserver_name$server _name;Fastcgi_paramServer_protocol$server _protocol; }}
Statement:
This article is from the "Orangleliu Notebook" blog, reproduced please be sure to keep this source http://blog.csdn.net/orangleliu/article/details/44851755
Author Orangleliu using Attribution-NonCommercial-sharing protocol in the same way
[Django] Deployment with fastcgi