艺术学院网站建设管理办法,网页制作教案,数字化文化馆网站建设,wordpress头像缓存到本地看到所有文件的权限都是没有的#xff0c;即便所有的权限都没有即使nginx做了配置#xff0c;这些都是正确的。那么在浏览器真正去访问的时候是不能访问的。 [rootjenkins html]# ls -l
total 4
drwxr-xr-x 2 root root 23 Sep 16 17:43 dist
---------- 1 root root 33 Sep …
看到所有文件的权限都是没有的即便所有的权限都没有即使nginx做了配置这些都是正确的。那么在浏览器真正去访问的时候是不能访问的。 [rootjenkins html]# ls -l
total 4
drwxr-xr-x 2 root root 23 Sep 16 17:43 dist
---------- 1 root root 33 Sep 16 17:42 index.html [rootjenkins html]# chmod 777 index.html
[rootjenkins html]# ls -l
total 4
drwxr-xr-x 2 root root 23 Sep 16 17:43 dist
-rwxrwxrwx 1 root root 33 Sep 16 17:42 index.html 这些文件需要读权限即可。
[rootjenkins html]# chmod r index.html
错误日志
2023/09/25 17:15:33 [error] 3099#0: *3 open() /usr/local/nginx/html/index.html failed (13: Permission denied), client: 192.168.11.1, server: localhost, request: GET / HTTP/1.1, host: 192.168.11.128 *355 open() /var/lib/nginx/tmp/proxy/3/07/0000000073 failed (13: Permission denied) while reading upstream, client: 127.0.0.1, server: localhost, request: GET /dinner/images/img1.png HTTP/1.1, upstream:
到 /var/lib/nginx/tmp 目录 用命令 ll 查看权限,如下
如果没有权限执行chmod -R 766 proxy/如果有权限无需执行
查看nginx的权限如图权限是nginx 然后更改nginx配置文件user nginx; 改成user root;
然后停止 nginx -s stop
重启nginx -c nginx.conf
然后测试发现搞定了over! 啦啦啦