[Django] Deployment with fastcgi

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.