1. 程式人生 > >nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)

nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)

client process 兩個 dex load onf forbidden .html cst

問題描述: 配置完 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]

/* */ logs]# date
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]
/* */ logs]# ps anx|grep nginx
6546 ? Ss 0:00 nginx: master process ./sbin/nginx
6702 ? S 0:00 nginx: worker process
6726 pts/1 S+ 0:00 grep nginx
說明:發現nginx的work process是nobody的
4. 修改 nginx.conf 文件
打開nginx.conf文件所在的目錄,查看文件的屬性 (root root)
[[email protected] nginx]# ll
drwxr-xr-x. 2 root root 4096 Jun 15 04:08 conf
在nginx.conf文件的第一行加上 user root root;
[[email protected]
/* */ nginx]# cat conf/nginx.conf
user root root;
5. 重新 reload nginx進程
[[email protected] nginx]# ./sbin/nginx -s reload
6. 再次訪問,成功!

技術分享

nginx之 [error] 6702#0:XXX is forbidden (13: Permission denied)

相關推薦

nginx [error] 6702#0:XXX is forbidden (13: Permission denied)

client process 兩個 dex load onf forbidden .html cst 問題描述: 配置完 nginx 兩個虛擬機後,客戶端能夠訪問原始的server ,新增加的 server 虛擬機 不能夠訪問,報錯如下頁面 解決過程: 1. 查看報錯日誌

Nginxnginx 500 Internal Server Error錯誤 )error_log is forbidden (13: Permission denied)

ps -ef|grpe nignx  發現啟動nginx 對應的使用者為nginx 修改nginx.conf vim /etc/nginx/nginx.conf 將user nginx; 改為user root;重新啟動nginx即可 (有時候/nginx -s reload 或者 ser

Centos7 nginx修改資料夾後 is forbidden (13: Permission denied)

我們可以通過 ls -Z 這個命令來檢視我們檔案的上下文資訊,也就是SELinux資訊,我們發現其比傳統的 ls 命令多出來了 system_u:object_r:admin_home_t:s0 這個東西,我們現在就來分析一下這段語句所代表的含義system_u:objec

Nginx報錯403 forbidden (13: Permission denied)的解決辦法

str 臨時 一是 nginx報錯 bsp config ssi 不用 tro 引起nginx 403 forbidden通常是三種情況:一是缺少索引文件,二是權限問題,三是SELinux狀態 一、缺少index.html 二、權限問題,如果nginx沒有web目錄的操作權

運行用例時,報錯Unknow Error:Element xxx is not clickable……的解決方法

cut 處理 ebe 將他 最好 executor tro path img 通常這種情況是由於在點擊該元素時,js更換了元素屬性造成的。 所以可以采用js的方式進行處理 方法如下: WebDriver driver = new FirefoxDriver(); Web

AndroidError: 'L' is not a valid file-based resource name character解決辦法

copyto base logo lower too exec article 問題 tools 1、問題 [html] view plain copy Error:Execution failed for task ‘:mergeBYODReleaseR

解決Mac nginx問題 [emerg] 54933#0: bind() to 0.0.0.0:80 failed (13: Permission denied)

denied 解決 pos == min 鏈接 home 裏的 services brew services restart nginx Stopping nginx... (might take a while) ==> Successfully stopped n

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8095 failed (13: Permission denied) nginx 啟動失敗

Starting nginx: nginx: [emerg] bind() to 0.0.0.0:8095 failed (13: Permission denied) nginx 啟動失敗,日誌裡面報錯資訊如下:  Starting nginx: nginx: [emerg] bind() to 0

Android 8.0 system app載入so Permission denied 解決

在預置包含react native 的Android app 預置到mtk 6739的系統中,此app 具體 platform 簽名。此app啟動會載入一些 facebook的so庫 發現此app 如果預置到system/app下,啟動會報錯。開始以為是沒有把相關的so庫 放到 sys

nginx轉發內網站點保13 permission denied錯誤

用niginx 將內網站點臨時開一個外網介面,一直報13錯誤 後來差了是selinux的原因 又不想整個關閉selinux 檢查網路訪問的配置 getsebool -a | grep httpd_can_network_connect 如結果如下 httpd_can_network_connect

解決Nginx13: Permission denied) while connecting to upstream

一、問題 做Nginx負載的時候,經常遇到這樣的情況: 2018/12/04 11:05:08 [crit] 2717#2717: *10 connect() to 127.0.0.1:5601 failed (13: Permission denied) while connecting to u

nginx的許可權問題(13: Permission denied)解決辦法

問題:nginx 部署應用後,訪問埠 總是報500   檢視日誌 發現是 許可權問題 13: Permission denied 解決辦法 編輯nginx.conf user nginx  修改為 user root   停止nginx -

解決OSError: [Errno 13] Permission denied: '/dev/virtio-ports/ovirt-guest-agent.0'

 oVirt虛擬化平臺中新裝了一臺Deepin Linux的虛擬機器,使用apt install ovirt-guest-agent後服務啟動失敗,檢視/var/log/ovirt-guest-agen

Unable to create/open lock file: /data/db/mongod.lock errno:13 Permission denied Is a mongod instanc

I was having the same problem on a Ubuntu ec2 instance. I was following this amazon article on page 7: Mongodb path in /etc/mongodb.conf was set to /v

Could not install packages due to an Environment Error: [Errno 13] Permission denied 解決方案

執行pip install 報錯如下: Could not install packages due to an Environment Error: [Errno 13] Permission denied: '/usr/local/lib/python3.5/dist-packages/kiwisolv

centos 7上nginx 報錯,open() "test.min.css" failed (13: Permission denied

OS: Centos7 Kernal: 3.10.0-327.el7.x86_64 在配置好django及相應的nginx反向代理後 發現web開啟沒有找到靜態檔案,nginx日誌報permissi

Mac idea error=13, Permission denied

問題 12:26 Error running 'rs8080': Cannot run program "/Users/xxx/software/apache-tomcat-8.5.37/bin/catalina.sh" (in directory "/Users/xxx/software/apache-t

nginx配置proxy_pass出現502/13: Permission denied問題解決

場景 centos 7 :nginx配置監聽80埠,並將請求轉發到Tomcat 8080埠。瀏覽器訪問域名,出現502錯誤。 通過檢視nginx日誌: connect() to 127.0.0.1:9090 failed (13: Permission denied) w

關於nginx的許可權問題(13: Permission denied)解決辦法

    今天一下午都被這個問題困擾,我覺得我寫的都是對的,nginx.conf檔案改了,access日誌的地方也改了,日誌的許可權也改成777了,但是還是不行,處於崩潰狀態。   後來我終於解決了這個

Jupyter執行時出現下面的錯誤:Unexpected error while saving file: arma/Untitled.ipynb [Errno 13] Permission denied:

執行環境:Ubuntu16.04+Python2.7執行如下程式碼修改Jupyter的一部分檔案的許可權(執行完之後重新啟動即可): sudo chmod 777 ~/.local/share/jupyter/ cd ~/.local/share/jupyter/ ls s