Code
Nginx: worker_connections are not enough, reusing connections
We meet an error log on nginx: worker_connections are not enough, reusing connections
. To resolve this issue, here is my working solution according to the references:
NGINX is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. NGINX is known for its high performance, stability, rich feature set, simple configuration, and low resource consumption.
NGINX is one of a handful of servers written to address the C10K problem. Unlike traditional servers, NGINX doesn’t rely on threads to handle requests. Instead it uses a much more scalable event-driven (asynchronous) architecture. This architecture uses small, but more importantly, predictable amounts of memory under load. Even if you don’t expect to handle thousands of simultaneous requests, you can still benefit from NGINX’s high-performance and small memory footprint. NGINX scales in all directions: from the smallest VPS all the way up to large clusters of servers.
We meet an error log on nginx: worker_connections are not enough, reusing connections
. To resolve this issue, here is my working solution according to the references:
The default file upload size is 2M.
If we are supposed to increase the size, a few update would be required.
一般情况下,TCP 是独占监听一个端口的,但是一台机器上可能需要部署若干个 HTTP Server,两个服务程序同时监听 80 端口,虽然可以通过一些参数做到,不过修程序让它们不打架相当麻烦。
一般情况下我们可以通过 Apache 或者 Nginx 作为连接服务,监听 80 和 443 端口,然后按请求 host 分别转发 http 请求。 (more…)
现在的世界满是https,若想和外部相处,我们也常常需要使用到https的页面.安全越来越被人重视,而成本并不是很高,配置一个SSL自然是理所应当的.
这次使用的是从 namecheap 上购买的 comodo 提供的 positivessl wildcard产品,价格有点肉痛,实际上大概花了RMB600的样子.
有些细节和以前alphassl搞到的证书不太一样,所以稍稍记录下,以便以后查询. (more…)
nginx若打算对某个server做中转,一个简单的方法是在/etc/nginx/conf.d/目录下添加一个.conf文件,内容如下: (more…)