标签:nginx反向代理
一种:<?xml:namespace prefix="o" ns="urn:schemas-microsoft-com:office:office">
?xml:namespace> server {
listen 80;
server_name www.etiantian.org etiantian.org bbs.etiantian.org blog.etiantian.org;
location / {
proxy_pass http://www;
proxy_set_header Host $host;
}
}
upstream www {
server 172.16.1.6 ;
}
第二种:
server {
listen 80;
server_name www.etiantian.org etiantian.org;
location / {
proxy_pass http://www.etiantian.org;
}
}
server {
listen 80;
server_name bbs.etiantian.org;
location / {
proxy_pass http://bbs.etiantian.org;
}
}
server {
listen 80;
server_name blog.etiantian.org;
location / {
proxy_pass http://blog.etiantian.org;
}
}
upstream www.etiantian.org {
server 172.16.1.6 ;
}
upstream bbs.etiantian.org {
server 172.16.1.6 ;
}
upstream blog.etiantian.org {
server 172.16.1.6 ;
}
标签:nginx反向代理
原文地址:http://7179867.blog.51cto.com/7169867/1627970