全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 1624|回复: 3

LNMP /substitutions 反代DZ3.2 打不开网站什么问题

[复制链接]
发表于 2015-12-8 21:04:37 | 显示全部楼层 |阅读模式
本帖最后由 HKCPC 于 2015-12-9 15:26 编辑

--user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --add-module=/root/substitutions4nginx-read-only --with-http_gzip_static_module --with-ipv6 --with-http_sub_module

server{
listen 80;
server_name t.playvps.com;  #绑定的域名
access_log off;                #off 关闭日志
location / {
subs_filter 'www.baidu.com' 't.playvps.com' gi;  #substitutions4nginx替换 (使用方法参照官方)
proxy_set_header   X-Real-IP  $remote_addr;
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header   Referer http://www.baidu.com;        #强制定义Referer,程序验证判断会用到
proxy_set_header   Host www.baidu.com;                  #定义主机头,如果目标站点绑定的域名个server_name项的吻合则使用$host
proxy_pass http://www.baidu.com;                        #指定目标,建议使用IP或者nginx自定义池
proxy_set_header Accept-Encoding "";                        #清除编码
        }
}

=================================

由于自己的网站域名A (linoed)被移动封了,

所以要注册一个新域名B(使用美国VPS)反代域名A,但是使用如上模板来反代域名A的网站,打开错误就是好像没有网站一样,nginx启动成功

是那里错了呢?

或者有什么其他好的方案,镜像数据库同步就不要了吧,好像很麻烦。

=================================

configure arguments: --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module --with-http_spdy_module --add-module=/root/substitutions4nginx-read-only --with-http_gzip_static_module --with-ipv6 --with-http_sub_module

 楼主| 发表于 2015-12-9 15:31:47 | 显示全部楼层
server
{
listen 80;
server_name www.BBBBBB.com;
location / {
proxy_pass http://www.AAAAAA.org;
proxy_redirecct off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

这样也打不开网站,怎么回事?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2024-5-20 01:51 , Processed in 0.081286 second(s), 11 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表