摘要: Nginx可以通过HTTPLimitZoneModule和HTTPCoreModule两个目录来限速。示例:1 limit_zone one $binary_remote_addr 10m;2 3 location / { 4 5 limit_conn one 1;6 7 limit_rate 100k;8 9 } 说明:limit_zone,是针对每个IP定义一个存储session状态的容器。这个示例中定义了一个10m的容器,按照32bytes/session,可以处理320000个session。然后针对目录进行设定。limit_connone1;... 阅读全文
posted @ 2012-05-30 18:02 Rayol 阅读(382) 评论(0) 推荐(0) 编辑
摘要: 1、查看当前的PHP FastCGI进程数是否够用:netstat -anpo | grep “php-cgi” | wc -l 如果实际使用的”FastCGI进程数”接近预设的”FastCGI进程数”,那么,说明”FastCGI进程数”不够用,需要增大。2、部分PHP程序的执行时间超过了Nginx的等待时间,可以适当增加nginx.conf配置文件中FastCGI的timeout时间,例如:……http{……fastcgi_connect_timeout 300;fastcgi_send_timeout 300;fastcgi_read_timeout 300;……} 阅读全文
posted @ 2012-05-30 17:53 Rayol 阅读(557) 评论(1) 推荐(0) 编辑
摘要: 要使用Nginx下的泛域名支持,必须在编译 Nginx的时候加上–with-http_sub_module在配置nginx时:server_name www.domain.com *.domain.com;然后启动nginx就可以实现了[nginx -s reload] 阅读全文
posted @ 2012-05-30 17:42 Rayol 阅读(2712) 评论(0) 推荐(0) 编辑