Nginx与网站构buildPyramid框架(Python):如何configuration?

我写了Pyramid框架(Python)的网站,并购买了VPS(OpenVZ技术)服务器。

我是服务器pipe理的新手,没有太多关于如何用Python和PyramidconfigurationNginx的文档。

也许问题一眼就看出来很差,但是我在服务器的configuration技术知识上有很大的差距。 也许有我的问题,我没有find有用的链接。

提前致谢!

金字塔和Nginx都有独立的非常好的文档。 我假设你已经在服务于内容的Waitress或Paster在本地build立了你的网站。 本质上,从Nginx的configuration中,您只需将来自端口80(网站stream量的常用端口)的传入stream量导向您的Paster / Waitress端口(例如8000,6543等)。 在下面的链接中有一些额外的提示,确保Nginx(这将是您的“反向代理”)通过主机标题传递给Paster / Waitress,所以你的金字塔应用程序可以生成正确的url。

http://docs.pylonsproject.org/projects/pyramid_cookbook/en/latest/deployment.html#nginx-paster-supervisord

http://docs.pylonsproject.org/projects/waitress/en/latest/#using-behind-a-reverse-proxy