In response to the error: Shenma, encountered 403 again?
2018/04/04 16:42:22 [error] 8830#0: *9 open() "/application/nginx-1.6.3/html/favicon.ico" failed (13: Permission denied), client: 10.38.238.234, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "10.0.137.143", referrer: "http://10.0.137.143/"
Solutions:
1. Due to the inconsistency between the startup user and the nginx working user
[root@t-red7 logs]# ps aux | grep "nginx: worker process" |awk '{print $1}'
root
root
2 Change the user of nginx.config to the same as the startup user,
Command: vi conf/nginx.conf
3. If the index.html or index.php file is missing, it is the specified file in the line index index.html index.htm in the configuration file
server {
listen 80;
server_name localhost;
index index.php index.html;
root /data/html/;
}
4. Permission problem, if nginx does not have the operation permission of the web directory, a 403 error will also occur.
chmod -R 777 /data/html
5. Firewall reasons
View: /usr/sbin/sestatus
Modify SELINUX=enforcing to SELINUX=disabled state
reboot