nginx 의 부하 균형 에 대한 간단 한 설정

      80         8080 9090        
user  root;
#  
worker_processes  1;
#   
#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

#pid        logs/nginx.pid;


events {

    use epoll;
	#IO  
    worker_connections  1024;
	#         
}


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

    sendfile        on;

    keepalive_timeout  65;
    
	upstream myNginx{
		server localhost:8080;
		server localhost:9090;
	}
	#        

    server {
        listen       80;
        server_name  localhost;

        #charset koi8-r;

        #access_log  logs/host.access.log  main;

        location / {
            root   html;
            index  index.html index.htm;
			proxy_pass http://myNginx;
			#   myNginx
          }
    }
}

좋은 웹페이지 즐겨찾기