我特地试了下,没问题。
直接贴nginx的代码了
a.weiboes.com反向到http://
airweibo.sinaapp.com/b.weiboes.com反向到http://
shiguangji.sinaapp.com/你可以访问下看看,我自己试了没问题。
代码的subs_filter那行是用来替换输出文本的,你没装替换插件的话就把这行删了。
---------------------------------
server
{
listen 80;
server_name
a.weiboes.com;
location / {
proxy_redirect off;
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header referer
http://airweibo.sinaapp.com/; proxy_pass
http://airweibo.sinaapp.com/; proxy_set_header Accept-Encoding "";
subs_filter '
airweibo.sinaapp.com' '
a.weiboes.com' g;
}
}
server
{
listen 80;
server_name
b.weiboes.com;
location / {
proxy_redirect off;
proxy_set_header Host $proxy_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header REMOTE-HOST $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header referer
http://shiguangji.sinaapp.com/; proxy_pass
http://shiguangji.sinaapp.com/; proxy_set_header Accept-Encoding "";
subs_filter '
shiguangji.sinaapp.com' '
b.weiboes.com' g;
}
}