Today, I tested nginx access on my virtual machine, and the results were 403 Forbidden
First check whether there is a missing index in the nginx configuration file HTML or index PHP files, files are normal
Check the SELinux status of the server. The configuration file/etc/SELinux/config and SELinux = disabled are also correct
Then check the log information:/usr/local/nginx/logs/error log
The display is caused by permission problems. View the main configuration file of nginx/usr/local/nginx/conf/nginx conf
After changing the user to root, restart nginx # systemctl restart nginx Service access is effective
Summary: there are three common situations causing nginx access error 403 Forbidden: lack of index file, permission problem and SELinux status
It can be successfully modified according to specific problems.
Similar Posts:
- Nginx Error: Nginx 403 error:directory index of “xxx“ is forbidden
- [Solved] nginx Error: directory index of “/home/www/hexo/” is forbidden
- [Solved] Nginx: [error] open() "/usr/local/Nginx/logs/Nginx.pid
- [Sovled] CentOS nginx 500 error: failed (13: Permission denied)
- How to Solve Nginx Error 13: Permission denied) while connecting to upstream
- Nginx Error: nginx: [emerg] “server” directive is not allowed here in
- Solution of [errno 5] input / output error after Django is deployed on nginx
- [Solved] Nginx Log Error: open() “/opt/Nginx/nginx/nginx.pid” failed (2: No such file or directory)
- [Solved] Nginx reverse proxy 502 permission denied
- [Solved] Nginx Restart Error: nginx: [error] open() “/usr/local/nginx/logs/nginx.pid” failed (2: No such file or directory)