zdz / ServerStatus-Rust

✨ Rust 版 ServerStatus 探针、威力加强版
https://ssr.rs
Apache License 2.0
1.83k stars 330 forks source link

[Request] 配置文件增加反代资源路径选项 #330

Open yi-shiyu opened 3 months ago

yi-shiyu commented 3 months ago

🥰 需求描述

通过nginx路径进行反代,结果html上面引用静态资源/static/css/是绝对路径,没有走到反代路径导致404

🧐 解决方案

增加反代路径选项

📝 补充信息

No response

zdz commented 3 months ago

nginx rewrite

anylones commented 3 months ago

转发静态文件试试 location ~ .*.(js|css|png)$ { proxy_pass http://127.0.0.1:8080; expires 30d; }