nginx python如何配置支持
时间:2016-01-07 19:14 来源:linux.it.net.cn 作者:IT
系统UbuntuWEB服务器:Nginx请问如何配置支持Python3.x
1.安装nginx安装过nginx这就不好从新演示了.默认你也安装好了nginx.
2.安装flup
$:dpkg -l *flup*
打印信息:
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-===========================-===========================-======================================================================
ii python-flup 0.2126-1 Implements Python Web Server Gateway Interface (WSGI)
$:apt-get install python-flup
3:配置nginx.conf.这个是按照网上配置的.
server {
listen 1235;
server_name localhost;
#charset koi8-r;
#Access_log /dev/null;
access_log /usr/local/nginx/logs/access.log;
location / {
#location /htm {
# root /home/utest/ms;
#}
root /home/utest/ms;
fastCGI_pass 127.0.0.1:1234;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param CONTENT_LENGTH $content_length;
include fastcgi_params;
fastcgi_pass_header Authorization;
fastcgi_intercept_errors off;
}
}
nginx python如何配置解释:
端口:1235--为监听端口.端口:1234----为web服务器运行的端口.
4.c. 启动 python manage.py runfcgi host=127.0.0.1 port=1234 pidfile=django.pid
(责任编辑:IT)
系统UbuntuWEB服务器:Nginx请问如何配置支持Python3.x 1.安装nginx安装过nginx这就不好从新演示了.默认你也安装好了nginx. 2.安装flup $:dpkg -l *flup* 打印信息: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad) ||/ Name Version Description +++-===========================-===========================-====================================================================== ii python-flup 0.2126-1 Implements Python Web Server Gateway Interface (WSGI) $:apt-get install python-flup 3:配置nginx.conf.这个是按照网上配置的. server { listen 1235; server_name localhost; #charset koi8-r; #Access_log /dev/null; access_log /usr/local/nginx/logs/access.log; location / { #location /htm { # root /home/utest/ms; #} root /home/utest/ms; fastCGI_pass 127.0.0.1:1234; fastcgi_param PATH_INFO $fastcgi_script_name; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param QUERY_STRING $query_string; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param CONTENT_LENGTH $content_length; include fastcgi_params; fastcgi_pass_header Authorization; fastcgi_intercept_errors off; } } nginx python如何配置解释: 端口:1235--为监听端口.端口:1234----为web服务器运行的端口. 4.c. 启动 python manage.py runfcgi host=127.0.0.1 port=1234 pidfile=django.pid (责任编辑:IT) |