码迷,mamicode.com
首页 > 其他好文 > 详细

shopnc nginx优化配置文件

时间:2015-03-03 16:35:35      阅读:151      评论:0      收藏:0      [点我收藏+]

标签:

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优化配置文件

标签:

原文地址:http://www.cnblogs.com/zx-admin/p/4311215.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!