Posts Tagged ‘Nginx’

nginx 正则

November 12th, 2010

location

syntax: location [=|~|~*|^~] /uri/ { … }
语法:location [=|~|~*|^~] /uri/ { … }

default: no
默认:否

» Read more: nginx 正则

nginx防采集(抓取)设定

November 1st, 2010

通过分析nginx的日志来过滤出访问过于频繁的IP地址,然后添加到nginx的blockip.conf,并重启nginx

» Read more: nginx防采集(抓取)设定

Imagecache 在Nginx Web服务器上的url访问重写规则

September 6th, 2010

Imagecache会自动生成缓存图片,其原理是服务器第一次访问没有找到缓存图片时,会根据url重写规则,调用Imagecache模块里面的代码来创建缓存图片。如果你的Nginx服务器里面已经单独对静态文件的处理进行了配置,有可能会略过Imagecache,直接向客户端返回一个图片不存在的页面。下面的配置可以解决这个问题。 » Read more: Imagecache 在Nginx Web服务器上的url访问重写规则

nginx 每天定时切割Nginx日志的脚本

August 30th, 2010

每天定时切割Nginx日志的脚本

1、创建脚本/usr/local/nginx/sbin/cut_nginx_log.sh,输入以下内容:

» Read more: nginx 每天定时切割Nginx日志的脚本

nginx ajax 上传文件问题

August 19th, 2010

proxy_hide_header Content-Type;

本行注销掉,否则,firefox和chrome ajax上传会出错误。

» Read more: nginx ajax 上传文件问题

[转]Nginx 0.8.x + PHP 5.2.13(FastCGI)搭建胜过Apache十倍的Web服务器(第6版)

August 10th, 2010

前言:本文是我撰写的关于搭建“Nginx + PHP(FastCGI)”Web服务器的第6篇文章。本系列文章作为国内最早详细介绍 Nginx + PHP 安装、配置、使用的资料之一,为推动 Nginx 在国内的发展产生了积极的作用。本文可能不断更新小版本,请记住原文链接“http://blog.s135.com/nginx_php_v6/”,获取最新内容。第6篇文章主要介绍了Nginx 0.8.x新的平滑重启方式,将PHP升级到了5.2.14,修正了PEAR问题。另将MySQL 5.1.x升级到了5.5.x系列,配置文件变更较大。

Transfer-Encoding:chunked与nginx 0.6.34[转]

August 10th, 2010

自从Labs主站换Nginx方式做分布以后,一直有一个困扰着我们的问题,就是页面无法访问和找不到的时候,显示的前后多了一些数字。因为之前一直没有时间去调查这个问题,所以就这么放着,最近终于找到机会研究了一把。

» Read more: Transfer-Encoding:chunked与nginx 0.6.34[转]

nginx 做代理服务器时的HTTP版本问题

August 4th, 2010

 

在NginxHttpProxyModule模块的说明中有:

It is an HTTP/1.0 proxy without the ability for keep-alive requests yet. (As a result, backend connections are created and destroyed on every request.) Nginx talks HTTP/1.1 to the browser and HTTP/1.0 to the backend server. As such it handles keep-alive to the browser.

» Read more: nginx 做代理服务器时的HTTP版本问题

Nginx时报错 requires the PCRE library

July 23rd, 2010

安装Nginx时报错

./configure: error: the HTTP rewrite module requires the PCRE library.

» Read more: Nginx时报错 requires the PCRE library