nginx 와 node 결합 설정

#user  nobody;
#        (    CPU    2  CPU)
worker_processes  2;



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  off;  
    access_log  logs/access.log;  
  
    client_header_timeout  3m;  
    client_body_timeout    3m;  
    send_timeout           3m;  
   
    client_header_buffer_size    1k;  
    large_client_header_buffers  4 4k;  
  
    sendfile        on;  
    tcp_nopush      on;  
    tcp_nodelay     on;

    #keepalive_timeout  75 20;  
  
     
  
    server {  
            listen       80;
            server_name  localhost;
	    #           
	    root E:/xxx/webroot;
	    index index;

            location / {
		proxy_connect_timeout   3; 
		proxy_send_timeout      30;  
		proxy_read_timeout      30;
		#       http://127.0.0.1:3000/  
		proxy_pass http://127.0.0.1:3000/;  
            }
            location ~ .*\.(htm|html|gif|jpg|jpeg|png|bmp|swf|ico|rar|zip|txt|flv|mid|doc|docx|ppt|pdf|xls|xlsx|mp3|wma)$ {   #         nginx    
		expires 30d;
	    }
	    location ~ .*\.(js|css)?$ {
		expires 1h;
	    }
              
   }  


}  

좋은 웹페이지 즐겨찾기