Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to solve the error report of nginx [error] 6702: 0

Shulou Source: shulou.com Published: 2022-05-31 20:25:47 09月22日 Update

This article mainly explains "how to solve the error report of nginx [error] 6702: 0". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to solve the error report of nginx's [error] 6702: 0.

Problem description: after configuring two nginx virtual machines, the client can access the original server, but the newly added server virtual machine cannot be accessed, resulting in an error

Resolution process:

1. View error log

[root@mysql03 nginx] # cat logs/error.log

04:00:57 on 2017-06-15 [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"

[root@mysql03 logs] # date

Thu Jun 15 04:01:27 CST 2017

two。 Check permissions

[root@mysql03 ~] # ll

Drwxr-xr-x. 2 root root 4096 Jun 15 03:59 html

[root@mysql03 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

Description: found no problem with directory permissions

3. Check the nginx startup process

[root@mysql03 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

Description: found that nginx's work process is nobody's.

4. Modify the nginx.conf file

Open the directory where the nginx.conf file is located and view the properties of the file (root root)

[root@mysql03 nginx] # ll

Drwxr-xr-x. 2 root root 4096 Jun 15 04:08 conf

Add user root root to the first line of the nginx.conf file

[root@mysql03 nginx] # cat conf/nginx.conf

User root root

5. Re-reload nginx the process

[root@mysql03 nginx] #. / sbin/nginx-s reload

6. Visit again, successful!

At this point, I believe you have a deeper understanding of "how to solve the error report of nginx [error] 6702: 0". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Files contents permissions directories processes problems learning checking original practical deeper successful one line two interest again practical customer client Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS OPPO Reno Huawei Microsoft Redmi