Nginx 地址替换


实际访问地址

http://xxx.com/test/api/micro/GetDev

代理后 将url中test替换掉

http://xxx.com/api/micro/GetDev

修改 Nginx 配置文件 nginx.conf 中 server 节点

location /test/ {
	rewrite	"^\/test\/(.*)$" /$1 break;
	proxy_pass http://localhost:5000;
	break;
}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM