C'est La Vie

    人生无彩排,每一天都是现场直播!

    利用反向代理实现SAE的域名绑定

    在NGINX中配置文件中添加下面代码: server { listen 80; server_name xxx […]

    在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 !

    发表回复

    您的电子邮箱地址不会被公开。 必填项已用*标注