想通过 http://aaa/ceshi 访问到 http://bbb 的内容, 但是代理后一些 js ,css 文件报 404,发现是缺少前缀的问题。请问 a 机器上怎么配置? 谢谢大家
location ^~/ceshi/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://192.168.0.50;
}
location ^~/ceshi/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://localhost/;
}
[08/Apr/2022:11:22:46 +0800] "GET / HTTP/1.0" 127.0.0.1 - -200 26867 "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" "192.168.21.233, 192.168.0.53"
:81/js/chunk-f0487752.5a2a9024.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:81/js/chunk-f5dfb222.b4892263.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:81/js/chunk-f46a5f00.d5bf17fb.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:81/js/chunk-fc9277e6.a8e8a87f.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
:81/js/chunk-ffb40534.0d082972.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
iview.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
gitalk.css:1 Failed to load resource: the server responded with a status of 404 (Not Found)
quill.snow.css:1
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.