user  www;
worker_processes 2; error_log /var/log/nginx/error.log error;
#error_log logs/error.log notice;
#error_log logs/error.log info; pid /var/run/nginx/nginx.pid; events {
worker_connections 65535;
use epoll;
multi_accept on;
} http {
include mime.types;
default_type application/octet-stream;
client_body_buffer_size 8k;
client_body_temp_path /tmp/client_body_temp;
client_body_timeout 30;
client_header_buffer_size 32k;
large_client_header_buffers 4 32k;
client_header_timeout 30;
client_max_body_size 32m;
keepalive_timeout 3;
tcp_nodelay on;
send_timeout 30;
sendfile on;
tcp_nopush on;
server_names_hash_max_size 512;
server_names_hash_bucket_size 128;
server_tokens off;
open_file_cache off; index index.php index.html index.htm; fastcgi_connect_timeout 60;
fastcgi_read_timeout 60;
fastcgi_send_timeout 60;
fastcgi_temp_path /tmp/fastcgi_temp 1 2;
fastcgi_buffer_size 64k;
fastcgi_buffers 256 4k;
fastcgi_max_temp_file_size 256k;
fastcgi_intercept_errors on;
fastcgi_index index.php; proxy_temp_path /tmp/proxy_temp;
proxy_buffer_size 4k;
proxy_bufffering on;
proxy_buffers 256 4K;
proxy_busy_buffers_size 8k; gzip on;
gzip_buffers 16 4k;
gzip_comp_level 1;
gzip_http_version 1.1;
gzip_min_length 1024k;
gzip_types text/plain text/css text/xml text/vnd.wap.wml application/x-javascript application/rss+xml application/xhtml+xml; real_ip_header X-Real-IP;
set_real_ip_header 127.0.0.1; #limit_zone crawler $binary_remote_addr 10m;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
include vhosts/*.conf;
}

shopnc nginx优化配置文件的更多相关文章

  1. Nginx优化具体,应对高并发

     nginx指令中的优化(配置文件) worker_processes 8; nginx进程数,建议依照cpu数目来指定.一般为它的倍数. worker_cpu_affinity 00000001 ...

  2. nginx优化php-fpm优化 压力测试达到每分150万访问量webbench网站压力

    webbench最多可以模拟3万个并发连接去测试网站的负载能力,个人感觉要比Apache自带的ab压力测试工具好,安装使用也特别方便. 1.适用系统:Linux 2.编译安装:引用wget http: ...

  3. nginx优化

    此文章非原创,出自鸟哥之手~ http://blog.chinaunix.net/uid-25266990-id-2985541.html 改排版改得多,当然红色部分要注意下,用得较多 ------- ...

  4. 2.Nginx优化

    [教程主题]:Nginx优化 [课程录制]: 创E [主要内容] Nginx 优化 nginx介绍 Nginx是俄罗斯人编写的十分轻量级的HTTP服务器,Nginx,它的发音为"engine ...

  5. Nginx的配置文件(nginx.conf)解析和领读官网

    步骤一:vi nginx.conf配置文件,参考本博文的最下面总结,自行去设置 最后nginx.conf内容为 步骤二:每次修改了nginx.conf配置文件后,都要reload下. index.ht ...

  6. CentOS6.5 Nginx优化编译配置[续]

    继续上文CentOS6.5 Nginx优化编译配置本文记录有关Nginx系统环境的一些细节设置,有关Nginx性能调整除了配置文件吻合服务器硬件之前就是关闭不必要的服务.磁盘操作.文件描述符.内核调整 ...

  7. CentOS6.5 Nginx优化编译配置

    说到Nginx,它真的算是我在运维工作中的好朋友,它优异的性能和极高的工作效率实在是让人大爱,来自internet的报告称其epoll模型能够支持高达50000个并发连接数. Epoll[维基百科]: ...

  8. Nginx核心配置文件常用参数详解

    Nginx核心配置文件常用参数详解 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 关于Nginx权威文档的话童鞋们可以参考Nginx官方文档介绍:http://nginx.org/ ...

  9. lnmp使用socket方式连接nginx优化php-fpm性能

    lnmp使用socket方式连接nginx优化php-fpm性能 Nginx连接fastcgi的方式有2种:TCP和unix domain socket 什么是Unix domain socket?- ...

随机推荐

  1. LightOJ 1247 Matrix Game (尼姆博弈)

    A - Matrix Game Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Submi ...

  2. Android 设置旋转朝向

    在AndroidMenifest.xml中activity标签中,添加一个属性 android:screenOrientation="landscape"

  3. Jam的计数法(codevs 1140)

    题目描述 Description Jam是个喜欢标新立异的科学怪人.他不使用阿拉伯数字计数,而是使用小写英文字母计数,他觉得这样做,会使世界更加丰富多彩.在他的计数法中,每个数字的位数都是相同的(使用 ...

  4. fork

    #include <unistd.h> #include <stdlib.h> #include <stdio.h> #include <fcntl.h> ...

  5. C/C++函数参数读取顺序2

    #include <stdio.h>int main(){ int a=1,b=3,c=3; printf("%d, %d, %d",(a++,b++,c++),b,c ...

  6. 开启InnoDB每表一个独立的表空间

    mysql> show variables like '%innodb%'; +---------------------------------+----------------------- ...

  7. jquery 展开折叠菜单

    jquery 展开折叠菜单 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <ht ...

  8. andorid开发易范的错误

    1 写DAO,调用远程API接口返回不来数据,实际这个api接口经过第三方工具测试通过的,原因是没有放到线程里.

  9. 设置session失效的几种方法

    转自:http://www.cnblogs.com/linjiqin/archive/2011/06/15/2081673.html 在系统登录后,都会设置一个当前session失效的时间,以确保在用 ...

  10. git学习 远程仓库02

    使用远程仓库: 查看当前远程库://克隆后,至少有一个名为 origin 的远程库,Git 默认使用这个名字来标识你所克隆的原始仓库 git remote -v: 并显示所有远程库的地址: 添加远程仓 ...