码迷,mamicode.com
首页 > 其他好文 > 详细

负载均衡【nginx反向代理】

时间:2018-06-05 00:40:25      阅读:136      评论:0      收藏:0      [点我收藏+]

标签:nginx反向代理配置文件

#######nginx 配置文件
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
upstream web_pools {
server 10.0.0.7:80 weight=1 max_fails=1 fail_timeout=10s ;
server 10.0.0.8:80 weight=1 max_fails=1 fail_timeout=10s ;
}
server {
listen 80;
server_name www.etiantian.org;
location / {
proxy_pass http://web_pools;
proxy_set_header Host $host;
}
}
server {
listen 80;
server_name bbs.etiantian.org;
location / {
proxy_pass http://web_pools;
proxy_set_header Host $host;
}
}
server {
listen 80;
server_name blog.etiantian.org;
location / {
proxy_pass http://web_pools;
proxy_set_header Host $host;
}
}

负载均衡【nginx反向代理】

标签:nginx反向代理配置文件

原文地址:http://blog.51cto.com/13667111/2124811

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!