Nginx 1.10.2 发布了。Nginx(发音同 engine x)是一款轻量级的Web 服务器/反向代理服务器及电子邮件(IMAP/POP3)代理服务器
更新内容:
Changes with nginx 1.10.2 18 Oct 2016 *) Change: the "421 Misdirected Request" response now used when rejecting requests to a virtual server different from one negotiated during an SSL handshake; this improves interoperability with some HTTP/2 clients when using client certificates. *) Change: HTTP/2 clients can now start sending request body immediately; the "http2_body_preread_size" directive controls size of the buffer used before nginx will start reading client request body. *) Bugfix: a segmentation fault might occur in a worker process when using HTTP/2 and the "proxy_request_buffering" directive. *) Bugfix: the "Content-Length" request header line was always added to requests passed to backends, including requests without body, when using HTTP/2. *) Bugfix: "http request count is zero" alerts might appear in logs when using HTTP/2. *) Bugfix: unnecessary buffering might occur when using the "sub_filter" directive; the issue had appeared in 1.9.4. *) Bugfix: socket leak when using HTTP/2. *) Bugfix: an incorrect response might be returned when using the "aio threads" and "sendfile" directives; the bug had appeared in 1.9.13. *) Workaround: OpenSSL 1.1.0 compatibility.
下载地址:
引用来自“eechen”的评论
@乌龟壳 应用缓存后Nginx会多出Cache Manager和Cache Loader这两个进程,也就是Nginx自己搞了一套跨进程内存缓存机制,不直接使用操作系统的文件系统缓存.看明白了,这个cache用的所谓的共享内存,是为了高性能地管理cache的key的,高性能地实现fastcgi_cache_lock,和缓存的数据内容无关,缓存的数据内容是放在磁盘上的。
引用来自“eechen”的评论
@乌龟壳 Nginx有AIO线程池实现非阻塞文件下载,Nginx的fastcgi_cache则用到了共享内存实现跨进程访问HTML静态缓存,比如:fastcgi_cache_path /png/ngx_fcgi_cache levels=1:2 keys_zone=EXAMPLE:512m inactive=1d max_size=2g;
含义为:
缓存地址,levels定义缓存的层次结构,共享内存占用512m,失效时间1日(日d/时h/分m),硬盘占用2g.
fastcgi_cache_path /png/ngx_fcgi_cache levels=1:2 keys_zone=EXAMPLE:512m inactive=1d max_size=2g;
含义为:
缓存地址,levels定义缓存的层次结构,共享内存占用512m,失效时间1日(日d/时h/分m),硬盘占用2g.
引用来自“eechen”的评论
2016-10-18 nginx-1.10.2 stable version has been released.PHP附件下载可以通过header("X-Accel-Redirect: $filepath");委托给Nginx.
PHP HTML缓存可以通过fastcgi_cache委托给Nginx实现.
PHP-FPM只专注于处理PHP,把HTTP交给更擅长的Nginx来处理.
Nginx + PHP-FPM 最佳拍档
PHP附件下载可以通过header("X-Accel-Redirect: $filepath");委托给Nginx.
PHP HTML缓存可以通过fastcgi_cache委托给Nginx实现.
PHP-FPM只专注于处理PHP,把HTTP交给更擅长的Nginx来处理.
Nginx + PHP-FPM 最佳拍档