shopnc nginx优化配置文件

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;
}

 

posted on 2015-03-03 16:07  zh7314  阅读(1009)  评论(0编辑  收藏  举报