Leif160519的blog Leif160519的blog

——————

目录
nginx静态资源文件无法访问,403 forbidden错误
/  

nginx静态资源文件无法访问,403 forbidden错误

今天在搭建nginx环境时出现一个奇怪问题,配置的静态资源目录下面文件无法访问,浏览器访问出现403 forbidden,解决办法如下:

解决方法是修改nginx.conf配置文件头部user nginxuser root

打开配置文件

vim /etc/nginx/nginx.conf

修改

user  root;  

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.” – Tom Cargill

标  题nginx静态资源文件无法访问,403 forbidden错误
作  者Leif160519
出  处https://github.icu/articles/2020/01/14/1578991132712.html
关于博主:坐标南京,运维工程师,如有问题探讨可以直接下方留言。
声援博主:如果您觉得文章对您有帮助,可以评论、订阅、收藏。您的鼓励是博主的最大动力!