Home > Article > Operation and Maintenance > How to solve 403 forbidden
Solution: 1. Modify the permissions and security attributes of the folder; 2. Execute the "ipconfig /flushdns" command in the cmd window to rebuild dos; 3. Open the "httpd.conf" file and change Just change "Deny from all" to "allow from all".
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
I believe many people have a general understanding of what 403 forbidden means, so how do we solve it when we encounter 403 forbidden? Let’s talk about the solution to 403 forbidden.
When we are making a website, 403 errors will appear on the website from time to time, and the browser will give the type of 404 error, and the server refuses to process it, but generally it is caused by the permissions of the directory.
1. If it is a file permission problem, we can modify the folder permissions and the folder security attributes
You can use the command to modify it, chcon -R -t httpd_user_content_t public_html/, as shown in the figure:
2. For some regular 403 errors, we can rebuild dos
Method: We run cmd on the computer, and then enter ipconfig /flushdns. You can also modify the host file to force parsing.
3. If the 403 problem is caused by apache, we only need to open httpd.conf and change Deny from all to allow from all and 403 will not appear.
4. If 403 appears in the HawkHost space, we only need to add some code to the .htaccess file.
#5. If 403 appears in the directory index, this is also a common problem. I said it was borrowed and asked me to borrow 10,000. I am now How can there be ten thousand,
[Recommended reading: 403 What does forbidden mean】
The above is the detailed content of How to solve 403 forbidden. For more information, please follow other related articles on the PHP Chinese website!