Nginx 403 forbidden (13: Permission denied)

Reason 1: Due to the inconsistency between the startup user and the nginx working user

Reason 2: Missing index.html or index.php file

index index.html index.htm index.php

nginx will look for files in the root directory in the order of index.html index.htm index.php. If none of these three files exist, then nginx will return 403 Forbidden.

Reason 3: Permission issue

$ chmod -R 777 /data

Reason 4: SELinux is set to enabled (enabled)

1. View the current status of selinux

$ / usr / sbin / sestatus

2. Change SELINUX=enforcing to SELINUX=disabled state

$ vi /etc/selinux/config

3. Restart

$ reboot

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326175212&siteId=291194637