nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)
問題描述: 配置完 nginx 兩個虛擬機後,客戶端能夠訪問原始的server ,新增加的 server 虛擬機 不能夠訪問,報錯如下頁面
解決過程:
1. 查看報錯日誌
[[email protected] nginx]# cat logs/error.log
2017/06/15 04:00:57 [error] 6702#0: *14 "/root/html/index.html" is forbidden (13: Permission denied), client: 10.219.24.1, server: www.nginx02.com, request: "GET / HTTP/1.1", host: "www.nginx02.com"
[[email protected]
Thu Jun 15 04:01:27 CST 2017
2. 檢查權限
[[email protected] ~]# ll
drwxr-xr-x. 2 root root 4096 Jun 15 03:59 html
[[email protected] html]# ll
total 8
-rw-r--r--. 1 root root 537 Jun 15 03:59 50x.html
-rw-r--r--. 1 root root 616 Jun 15 03:51 index.html
說明:發現目錄權限沒有問題
3. 檢查nginx啟動進程
[[email protected]