今天在搭建nginx环境时出现一个奇怪问题,配置的静态资源目录下面文件无法访问,浏览器访问出现403 forbidden,解决办法如下:
解决方法是修改nginx.conf
配置文件头部user nginx
为user 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错误