PHP project directory in nginx root directory, browser access reports 403 error

WBOY
Release: 2016-08-18 09:16:24
Original
1125 people have browsed it

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

Reply content:

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;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!