airbasic
V2EX  ›  问与答

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

  •  
  •   airbasic · Dec 22, 2014 · 2910 views
    This topic created in 4356 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   ·   2780 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 10:25 · PVG 18:25 · LAX 02:25 · JFK 05:25
    ♥ Do have faith in what you're doing.