V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
NGINX
NGINX Trac
3rd Party Modules
Security Advisories
CHANGES
OpenResty
ngx_lua
Tengine
在线学习资源
NGINX 开发从入门到精通
NGINX Modules
ngx_echo
hopewinn
V2EX  ›  NGINX

困扰几个月的反向代理,大神快进来。。。

  •  
  •   hopewinn · 2016-09-01 11:42:10 +08:00 · 2627 次点击
    这是一个创建于 2800 天前的主题,其中的信息可能已经有所发展或是发生改变。

    源服务器: 103.25.199.246 源域名: mkt.guticn.com

    代理服务器 IP: x.x.x 代理域名: mkt.guticn.com

    求反向代理 mkt.guticn.com 的正确配置。不代理,可以正常访问 https://mkt.guticn.com/onebook?WebSkinType=2 ,但是反向代理后,切换“大陆版”,一直有 400 错误,无法正常访问, 不知道有没有大神知道是什么原因,小师弟困扰了几个月了。。。

    234747005
        1
    234747005  
       2016-09-01 12:02:43 +08:00
    server {
    listen 80;
    server_name 代理域名;
    charset UFT-8;
    #access_log logs/日志.access.log off;
    location / {
    proxy_pass http://源 URL;
    proxy_redirect off;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

    }
    }
    hopewinn
        2
    hopewinn  
    OP
       2016-09-01 13:10:29 +08:00
    这么简单的话就不在这里发了,希望大神们抽空看看,。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2469 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 14:09 · PVG 22:09 · LAX 07:09 · JFK 10:09
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.