Apache is often unable to access the directory list, showing 403 Forbidden

Time:2021-2-15

Apache is often unable to access the directory list, showing 403 Forbidden

When developing and learning, every time you reset Apache, you always report an error: forbidden you don’t have permission to access / on this server

Apache is often unable to access the directory list, showing 403 Forbidden

Let me count the problems I have encountered and the solutions

First of all, if Linux is used, the directory permission of the website will be changed to 755

Solution 1:

Find / usr / local / Apache / conf/ httpd.conf

Include conf/extra/httpd-vhosts.conf

Since vhosts was not configured when it was first installed, you can access it by annotating it and restarting Apache

Solution 2:

hold index.php And |. PHP (PHP probe, if you don’t have it, you don’t need to move it) file name

Apache is often unable to access the directory list, showing 403 Forbidden
Solution 3:
This bothered me for a long time, and it was useless to change the Apache configuration file. Later, I found that it was the root directory. Htaccess file was set to – indexes by me and changed to + indexes
Apache is often unable to access the directory list, showing 403 Forbidden

This work adoptsCC agreementReprint must indicate the author and the link of this article

Recommended Today

Review of SQL Sever basic command

catalogue preface Installation of virtual machine Commands and operations Basic command syntax Case sensitive SQL keyword and function name Column and Index Names alias Too long to see? Space Database connection Connection of SSMS Connection of command line Database operation establish delete constraint integrity constraint Common constraints NOT NULL UNIQUE PRIMARY KEY FOREIGN KEY DEFAULT […]