lintoy
V2EX  ›  DotCloud

求教DOTCLOUD上能不能做反向代理的裸域绑定

  •  
  •   lintoy · Aug 5, 2011 · 10462 views
    This topic created in 5568 days ago, the information mentioned may be changed or developed.
    就像下面这个贴里一样的。
    http://www.v2ex.com/t/6663#reply16
    方法绑定一个域名做反向代理

    试了下面方法不行。
    创建 一个nginx.conf 配置文件

    server{

    listen 80;

    server_name bbs.mucun.tk;

    location / {

    proxy_redirect off;

    proxy_pass http://mucunbbs.appspot.com;

    proxy_set_header X-Real-IP $remote_addr;

    }

    }
    4 replies  •  1970-01-01 08:00:00 +08:00
    CoX
    CoX
    Aug 5, 2011
    1
    貌似是不行的吧
    ratazzi
    ratazzi
    PRO
    Aug 5, 2011
    2
    加个 Host 的头试下
    CoX
    CoX
    Aug 5, 2011
    3
    现在ghs.google.com貌似可以直接用,不用再反向一次吧
    feiandxs
    feiandxs
    Aug 5, 2011
    4
    #########
    server {
    listen xxxxxxx:80;
    server_name bbs.mucun.tk;

    location / {
    proxy_pass http://mucunbbs.appspot.com;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header FORWARDED-FOR $remote_addr;
    proxy_set_header Host bbs.mucun.tk;
    #set_real_ip_from xxxxxx;
    #real_ip_header X-Real-IP;
    #expires 3d;

    }

    }
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1298 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 21:06 · PVG 05:06 · LAX 13:06 · JFK 16:06
    ♥ Do have faith in what you're doing.