Nginx 다 중 도 메 인 이름 바 인 딩

2964 단어 nginx
#user  nobody;
worker_processes  5;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       mime.types;
    default_type  application/octet-stream;

    #log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    #                  '$status $body_bytes_sent "$http_referer" '
    #                  '"$http_user_agent" "$http_x_forwarded_for"';

    #access_log  logs/access.log  main;

    sendfile        on;
	#-------------------------------------------          :120M
	client_max_body_size 120m;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;

    #gzip  on;
	#----------------------(      )server1 ----------------------
    upstream gzzyly{  
         server 127.0.0.1:8012; 
         ip_hash ;  
    }
    server {
        listen       8011;
        server_name  www.server1.gov.cn 192.168.1.164;
        location / {
            #root   html;
            #index  index.html index.htm;
			proxy_pass http://gzzyly;  
            proxy_set_header Host $host;  
            proxy_set_header X-Real-IP $remote_addr;    
            proxy_set_header REMOTE-HOST $remote_addr;    
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
	#---------------------------END       )----------------------
	#----------------------(      )    ----------------------
    server {
        listen       8011;
        server_name  www.server2.gov.cn;        #charset koi8-r;
        #access_log  logs/host.access.log  main;
        location / {
            #root   html;
            #index  index.html index.htm;
			proxy_pass http://127.0.0.1:8083;  
            proxy_set_header Host $host;  
            proxy_set_header X-Real-IP $remote_addr;    
            proxy_set_header REMOTE-HOST $remote_addr;    
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
        }
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }
	#--------------END--------(      )   ----------------------
    
}

좋은 웹페이지 즐겨찾기