背景通过k8s访问http://192.168.1.2:32156/devops/index.html需跳转到http://192.168.1.2:32156/jenkins/
配置文件location=/devo PS/index.html { rewrite ^ $ scheme 3360//$ http _ host/Jenkins/permanent; } location=/Jenkins/{ root/usr/share/nginx/html; index /jenkins/index.html; }相关说明location=/devops/index.html#精确匹配/devops/index.html$scheme#包含客户端请求的地址,例如http$http_host#
Nginx下Rewrite的重定向配置与实践