coolair
V2EX  ›  问与答

请教一个 nginx rewrite 规则写法

  •  
  •   coolair · Oct 14, 2021 · 1355 views
    This topic created in 1849 days ago, the information mentioned may be changed or developed.
    2 replies  •  2021-10-14 16:55:00 +08:00
    wdssmq
    wdssmq
    Oct 14, 2021
    1
    {
    listen 8000;
    rewrite /media/avatar/(.+) http://a.test.com:8888/media/avatar/$1 permanent;
    }
    privil
    privil
    Oct 14, 2021
    2
    直接 location proxy_pass 也行啊 你这路径都不带改的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1891 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 15:38 · PVG 23:38 · LAX 07:38 · JFK 10:38
    ♥ Do have faith in what you're doing.