报错:
2020/06/17 14:53:36 [error] 18136#0: *14 open() "/home/jing/pythonDCC/pydcc/static/rest_framework/js/csrf.js" failed (13: Permission denied), client: 116.237.109.107, server: 49.232.161.243, request: "GET /static/rest_framework/js/csrf.js HTTP/1.1", host: "49.232.161.243", referrer: "http://49.232.161.243/dccpro/spdetail/1051129464"
访问静态路径Permission denied
解决:
搜索的多是修改将nginx.conf里的user nginx改成 user root;成功
但是不想这么启动
后来才发现是目录问题,部署目录在/home/adminis 修改user root后访问正常,之后将部署目录改为/data ,正常
总结:用户和访问路径不符合。
指定root用户 -----访问路径随便
其他用户(nginx,www)----->访问路径就不可以在/root路径下
403也可参考:
https://www.nginx.cn/695.html
https://blog.csdn.net/vanilla_he/article/details/79205091