首页 > 其他 > 详细

Nginx简易配置文件(二)(反向代理)

时间:2016-04-07 20:39:41      阅读:131      评论:0      收藏:0      [点我收藏+]
user  nobody nobody;
worker_processes  4;

error_log       logs/error.log;
pid             logs/nginx.pid;

events {
    use epoll;
    worker_connections  1024;
}


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

    sendfile            on;
    keepalive_timeout   65;

    access_log          logs/access.log;
    log_format  main  ‘$remote_addr - $remote_user [$time_local] "$request" ‘
                      ‘$status $body_bytes_sent "$http_referer" ‘
                      ‘"$http_user_agent" "$http_x_forwarded_for"‘;

	    upstream cluster_17 {
        server 192.168.1.103:80;
    }
	
	    server {
        listen 80;
        server_name 17.test.com;

         location / {
            proxy_pass http://cluster_17;
        }
    }
  

    upstream cluster_17w {
        server 192.168.1.103:8011;
    }
	
	server {
        listen 80;
        server_name 17w.test.com;

         location / {
            proxy_pass http://cluster_17w;
        }
    }

  include /usr/local/nginx/conf/vHost/*.conf;
}

 

Nginx简易配置文件(二)(反向代理)

原文:http://www.cnblogs.com/configure/p/5364842.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!