48 location ^~ /bgmonitor/ {
50 proxy_pass http://localhost:8080/;
51 }
形如www.mr.org/bgmonitor的请求转发到本地8080端口的tomcat
访问时由于${rc.contextPath}取出为空,导致整个资源路径变为/css/AdminLTE.css ,这个请求发到nginx后就没法正常转发啦
怎么做才能在最小修改的情况下让整个应用正常?
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
静态文件不需要转发,在 nginx 本机上部署静态文件,比如
具体如何配置参考文档