Home >Backend Development >PHP Tutorial >PHP project directory in nginx root directory, browser access reports 403 error
First of all, my running environment is Ubuntu14.04+Nginx1.4+MySQL5.6+PHP; secondly, the problem I am encountering now is that when my browser accesses the PHP project in the nginx root directory, a 403forbidden error is reported. However, accessing individual php files is no problem. Please give me some guidance
First of all, my running environment is Ubuntu14.04+Nginx1.4+MySQL5.6+PHP; secondly, the problem I am encountering now is that when my browser accesses the PHP project in the nginx root directory, a 403forbidden error is reported. However, accessing individual php files is no problem. Please give me some guidance
The index option of the server you did not set up with nginx does not have index.php (default file), so nginx treats your
request as access to the directory, and you have not set the permissions for directory access and you get a 403
nginx prohibits access to directory lists by default. If you need to access directory lists, you need to add autoindex on;