lintoy
V2EX  ›  DotCloud

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

  •  
  •   lintoy · Aug 5, 2011 · 9953 views
    This topic created in 5392 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
        1
    CoX  
       Aug 5, 2011
    貌似是不行的吧
    ratazzi
        2
    ratazzi  
       Aug 5, 2011
    加个 Host 的头试下
    CoX
        3
    CoX  
       Aug 5, 2011
    现在ghs.google.com貌似可以直接用,不用再反向一次吧
    feiandxs
        4
    feiandxs  
       Aug 5, 2011
    #########
    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   ·   Solana   ·   2719 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 15:56 · PVG 23:56 · LAX 08:56 · JFK 11:56
    ♥ Do have faith in what you're doing.