当 Nginx 与 Tornado 一起使用时,如何编译 Nginx
首先有这个宝石: nginx 配置的最佳说明 我发现它会更好仅使用我们需要的内容来编译源代码!所以我的问题很简单:
哪些模块仅在编译 Nginx 时才需要,因为它仅用于提供静态文件。
使用 SSL 支持进行编译有用吗?或者只让 Tornado 处理 SSL?
如何使用Tornado来处理打开的连接和Nginx超时配置值(client_body_timeout,client_header_timeout,keepalive_timeout),它们是更大还是更小的值? ?
对不起我的英语。
first there is this jewel: the best explication for nginx configuration and i've found that it will be better to compile the source only with what we'll need! so my questions are simple:
Which are modules that will only need when compiling Nginx when it will used only to serve static file.
Is it useful to make compile with the SSL support? or let only Tornado handle the SSL?
How about using Tornado to handle open connection and Nginx Timeout configurations values ( client_body_timeout, client_header_timeout, keepalive_timeout ) will they be bigger or smaller values ???
sorry for my english.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单、最可靠的方法是使用 nginx 作为tornado 的反向代理。让 nginx 处理所有前端连接以及 SSL。如果您需要更多处理能力,这还允许您运行多个龙卷风进程(最多 CPU 核心数)。
任何其他配置将取决于您的具体应用。
所以我首先添加
--with-http_ssl_module
。您可以使用
./configure --help
查看所有配置选项。如果您想删除更多标准模块,您可以通过排除过程找出您需要的内容 - 大多数--without-*
选项(代理除外)可能会在您的案件。这实际上取决于您以及您想使用什么。The easiest and most reliable method will be to use nginx as a reverse proxy for tornado. Have nginx handle all the frontend connections, as well as SSL. This will also allow you to run multiple tornado processes (up to # of CPU cores) if you need more processing power.
Any other configuration will depend on your specific application.
So I would just start by adding
--with-http_ssl_module
.You can see all the configure options with
./configure --help
. If you want to remove more of the standard modules, you can figure out what you need by process of elimination - most of the--without-*
options (other than proxy) could probably be used in your case. It's really up to you, and what you want to use.