airbasic
V2EX  ›  问与答

nginx 配置反向代理的一个小问题

  •  
  •   airbasic · Dec 22, 2014 · 2652 views
    This topic created in 4231 days ago, the information mentioned may be changed or developed.
    location /aaaa {
    proxy_pass http://www.baidu.com;
    }

    这样的话 访问http://localhost/aaaa 实际访问的却是 http://www.baidu.com/aaaa
    如何做到访问/aaaa 实际访问 www.baidu.com?
    airbasic
        1
    airbasic  
    OP
       Dec 22, 2014
    在线等,真的很着急!
    airbasic
        3
    airbasic  
    OP
       Dec 22, 2014
    谢谢 解决了 rewrite /aaaa/(.*) /$1 break;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2893 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 11:11 · PVG 19:11 · LAX 04:11 · JFK 07:11
    ♥ Do have faith in what you're doing.