nginx未检测到CSS和JS-服务器以404状态响应

nginx未检测到CSS和JS-服务器以404状态响应,nginx,nginx-location,nginx-reverse-proxy,nginx-config,Nginx,Nginx Location,Nginx Reverse Proxy,Nginx Config,这是我的nginx.conf。CSS和JS在这个文件夹中 /usr/share/nginx/static/css /usr/share/nginx/static/js /usr/share/nginx/static/media尝试使用root/usr/share/nginx/static我试过这样做,但不起作用``location~(css | js | img){root/usr/share/nginx/html/static;try_files$uri$uri/=404;}location

这是我的nginx.conf。CSS和JS在这个文件夹中

/usr/share/nginx/static/css
/usr/share/nginx/static/js

/usr/share/nginx/static/media
尝试使用
root/usr/share/nginx/static我试过这样做,但不起作用``location~(css | js | img){root/usr/share/nginx/html/static;try_files$uri$uri/=404;}location/{root/usr/share/nginx/html;index index.html index.htm;try_files$uri$uri/=404;}``访问日志中有哪些条目?是的,谢谢。我检查了访问日志,它采用了不同的路径。。我想可能路径是硬编码的。谢谢你的帮助