Apache 403 Forbidden

Source: Internet
Author: User
Tags apache 403 forbidden

1. Disable the indexes parameter, and the home page file does not exist in the site Directory

Here are the permissions issues for setting up the site Directory/application/apache2.22.27/htdocs, where the indexes parameter is in the site directory, if there is no home file index.xxx If the indexes parameter will show the structure of the site directory, if the indexes parameter is removed, then it appears 403 Forbidden

<directory "/application/apache2.22.27/htdocs" >

Options Indexes FollowSymLinks

AllowOverride None

Order Allow,deny

Allow from all

</Directory>

#################### #相关参数设置成下面, there will be 403 Forbidden

<directory "/application/apache2.22.27/htdocs" >

Options-indexes FollowSymLinks

AllowOverride None

Order Allow,deny

Allow from all

</Directory>

<ifmodule dir_module>

DirectoryIndex index.html

</IfModule>

Prohibit indexes parameter is an optimized function, because if you do not prohibit the indexes parameter, then when there is no home page file, then visit this site will list the entire Site directory structure, which is extremely insecure


2. For each additional site directory, you need to add the following to give the added directory the relevant permissions

<directory "added directory path such as:/application/apache2.22.27/htdocs" >

Options Indexes FollowSymLinks

AllowOverride None

Order Allow,deny

Allow from all

</Directory>

If you do not add the above content, then there is a 403 error


3. Even if you correctly set the permissions issue in 2, the site directory is not set to be readable by others.

<directory "added directory path such as:/application/apache2.22.27/htdocs" >

Options Indexes FollowSymLinks

AllowOverride None

Order Allow,deny

Allow from all

</Directory>

<ifmodule dir_module>

DirectoryIndex index.html

</IfModule>

Also specify the home page file index.html, your site directory also exists index.html but if your this site chmod permission does not allow other people to read. Then it could be a 403 error.

[Email protected]_web apache]# ll htdocs-d

D-wx--x--x 2 root root 4096 Sep 23:11 htdocs

[[Email Protected]_web apache]#

This article is from the "Technology Change Destiny" blog, please be sure to keep this source http://lvnian.blog.51cto.com/7155281/1696598

Apache 403 Forbidden

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.