0
点赞
收藏
分享

微信扫一扫

nginx rewrite例子 案例 要先梳理想要实现的需求 - openresty最好不要使用正则

_鱼与渔_ 2023-06-20 阅读 80

1. http://www.a.com/sys-auth-web/api/a.html   --> http://10.0.1.4:30954/a.html

location  /sys-auth-web/api {
        include proxy_params;
        proxy_pass http://10.0.1.4:30954;
        rewrite ^/sys-auth-web/api/(.*)$ /$1 break;
    }

 参考:https://cloud.tencent.com/developer/news/65131

用一个例子来演示会更加清晰



举报

相关推荐

0 条评论