Nginx的nginx.conf配置文件中文注释说明

2019-10-17 20:32:17于海丽

        large_client_header_buffers  4 4k;
 
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
 
        #设定负载均衡的服务器列表
         upstream mysvr {
        #weigth参数表示权值,权值越高被分配到的几率越大
        #本机上的Squid开启3128端口
        server 192.168.8.1:3128 weight=5;
        server 192.168.8.2:80  weight=1;
        server 192.168.8.3:80  weight=6;
        }
 
 
       server {
        #侦听80端口
            listen       80;
            #定义使用www.xx.com访问
            server_name  www.xx.com;
 
            #设定本虚拟主机的访问日志
            access_log  logs/www.xx.com.access.log  main;
 
        #默认请求
        location / {
              root   /root;      #定义服务器的默认网站根目录位置
              index index.php index.html index.htm;   #定义首页索引文件的名称
 
              fastcgi_pass  www.xx.com;
             fastcgi_param  SCRIPT_FILENAME  $document_root/$fastcgi_script_name;
              include /etc/nginx/fastcgi_params;
            }
 
        # 定义错误提示页面
        error_page   500 502 503 504 /50x.html; 
            location = /50x.html {
            root   /root;
        }