Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/jenkins/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何将Cherrypy wsgi放在Nginx后面?_Python_Nginx_Wsgi_Cherrypy - Fatal编程技术网

Python 如何将Cherrypy wsgi放在Nginx后面?

Python 如何将Cherrypy wsgi放在Nginx后面?,python,nginx,wsgi,cherrypy,Python,Nginx,Wsgi,Cherrypy,我当时想把cherrypy放在nginx服务器后面,但除了我家Debian发行版的nginx 502 bad gataway之外,我什么也没做。 以下是Nginx设置: location / { include uwsgi_params; uwsgi_pass 127.0.0.1:8080; } 当然有IP而不是socket,但是通过网络上的大量例子,我们努力使它工作。 我正在生产服务器中托管几个带有静态html的域,并尝试切换到python。我希望如果我解决了这个问题,我将毫不费力地

我当时想把cherrypy放在nginx服务器后面,但除了我家Debian发行版的nginx 502 bad gataway之外,我什么也没做。 以下是Nginx设置:

location / {
  include uwsgi_params;
  uwsgi_pass 127.0.0.1:8080;
}
当然有IP而不是socket,但是通过网络上的大量例子,我们努力使它工作。
我正在生产服务器中托管几个带有静态html的域,并尝试切换到python。我希望如果我解决了这个问题,我将毫不费力地部署我的python应用程序。

我正在使用uwsgi在nginx后面运行我的cherrypy网站,我正在使用以下位置配置设置

    location / {
     proxy_set_header    Host                $host;
     proxy_set_header    X-Real-IP           $remote_addr;
     proxy_set_header    X-Forwarded-For     $remote_addr;
     proxy_set_header    X-Originating-IP    $remote_addr;
     proxy_set_header    HTTP_REMOTE_ADDR    $remote_addr;
     proxy_set_header    REMOTE_ADDR         $remote_addr;
     proxy_set_header    CLIENT_IP           $remote_addr;
     proxy_pass http://0.0.0.0:8080/;
    }

希望这有帮助

当您转到为uwsgi_通行证指定的IP时,您是否能够查看网站?是的,直接在localhost:8080上运行。您的服务器名称设置为什么?问题的第一行是Lalambda用户提供的Cherrypy确切示例的链接。请看一看…不知道服务器名称是强制性的…有点困惑。是的…我正在努力,它成功启动了。Thanx巨大。