10,606
社区成员
发帖
与我相关
我的任务
分享
server {
listen 80; #监听端口
server_name www.gaara-xu.com gaara-xu.com www.yoyonote.com yoyonote.com; #监听地址
if ( $host = "www.gaara-xu.com"){
rewrite ^/ http://www.taobao.com break;
}
if ( $host = "www.yoyonote.com"){
rewrite ^/ http://www.yoyonote.com:9000 break;
}
if ( $host = "yoyonote.com"){
rewrite ^/ http://www.yoyonote.com:9000 break;
}
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}