Py学习  »  问与答

django nginx配置问题,大家帮忙看下,谢谢

why • 10 年前 • 3818 次点击  

试用nginx+fastcgi部署

nginx配置

location / { root /home/wd/testpython/django/gm;

    fastcgi_pass 127.0.0.1:8051;

    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 SERVER_PROTOCOL $server_protocol;

    fastcgi_param SERVER_PORT $server_port;

    fastcgi_param SERVER_NAME $server_name;

    fastcgi_pass_header Authorization;

    fastcgi_intercept_errors off;

}

运行

python manage.py runfcgi method=threaded host=127.0.0.1 port=8051

访问127.0.0.1:8088出现如下界面 enter image description here

然后访问127.0.0.1:8088/test就出现404了 enter image description here

请问是哪里出错了,谢谢

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/553
 
3818 次点击  
文章 [ 2 ]  |  最新文章 10 年前