Nginx主配置项说明

js yekong 46℃
user  www www;
worker_processes auto; //进程数
error_log  /www/wwwlogs/nginx_error.log  crit; //错误日志存放位置
pid        /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;

events
    {
        use epoll;
        worker_connections 51200; //并发数
        multi_accept on;
    }

http
    {
        include       mime.types; //文件扩展名映射表
        #include luawaf.conf;

        include proxy.conf;

        default_type  application/octet-stream;

        sendfile   on;
        tcp_nopush on;

        keepalive_timeout 60;//保持连接的时间 超时时间
        gzip on;  //是否开启gzip压缩
    
        limit_conn_zone $binary_remote_addr zone=perip:10m;
        limit_conn_zone $server_name zone=perserver:10m;

        server_tokens off;
        access_log off;  //访问日志

include /www/server/panel/vhost/nginx/*.conf; //子配置项
}

喜欢 (0)