利用反向代理实现SAE的域名绑定
- hliang
- 0
- Posted on
在NGINX中配置文件中添加下面代码:
server
{
listen 80;
server_name xxx.ixcv.com
location / {
proxy_redirect off;
proxy_pass http://xxx.sinaapp.com/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
或:
在APACHE服务器上 xxx.ixcv.com 主机的 .htaccess 文件中添加下面代码:
RewriteEngine On RewriteBase / RewriteRule ^(.*)$ http://xxx.sinaapp.com/$1 [P]
代码添加完成后,将域名 xxx.ixcv.com 解析到你的主机上,并重启你的服务,就OK了!
Enjoy it !