airbasic
V2EX  ›  问与答

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

  •  
  •   airbasic · Dec 22, 2014 · 2882 views
    This topic created in 4337 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
    airbasic
    OP
    Dec 22, 2014
    1
    在线等,真的很着急!
    airbasic
    airbasic
    OP
    Dec 22, 2014
    3
    谢谢 解决了 rewrite /aaaa/(.*) /$1 break;
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1842 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 06:58 · PVG 14:58 · LAX 22:58 · JFK 01:58
    ♥ Do have faith in what you're doing.