SAE如何通过反向代理的方式绑定域名?
1楼(未知网友)
简单配置 nginx
server {
listen 80;
server_name www.xun2.org;
location / {
proxy_redirect off;
proxy_pass http://saepy.sinaapp.com;
proxy_set_header Host "http://saepy.sinaapp.com";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_redirect false;
access_log off;
error_log off;
}
}
示例 http://www.xun2.org/
2楼(未知网友)
找一个支持htaccess的服务器,编辑一个htaccess文件为以下内容:
RewriteEngine On
RewriteBase /
RewriteRule ^(.*)$ http://你的二级域名.http://sinaapp.com/$1 [P]
然后将该htaccess上传到服务器上,并将你要绑定的域名指向该服务器即可。