Apache Directory directives

Source: Internet
Author: User

<Directory> directives

Syntax: <directory directory-path> ... </Directory>

<Directory>and the</Directory>used to encapsulate a set of instructions that take effect only on a directory and its subdirectories. Any can be in"Directory"the directives used in the scope can be used. Directory-pathcan be the full path to a directory, or contain aUnix Shella wildcard character string that matches the syntax. In a wildcard character string,"?"matches any single character,"*"matches any sequence of characters. You can also use"[]"to determine the range of characters. None of the above wildcard characters can match"/"characters. So<directory/*/public_html>will not match/home/user/public_html, but<Directory/home/*/public_html>to match correctly. Say, for example:

<Directory/usr/local/httpd/htdocs>
Options Indexes FollowSymLinks
</Directory>

When using the directory-path parameter, note that they must be consistent with the file system path that Apache uses to access the files. Commands given to a specific <Directory> will not be able to take effect on the same directory file that is pointed through different paths, such as the path generated by another symbolic connection.

Controls the order in which the default access state and allow and deny directives take effect

Order Deny,allow

All Access is forbidden

Deny from all

Allow IP 127.0.0.1

Allow from 127.0.0.1

In the Apache Server, if a folder does not have the specified access rights, the permissions on the parent directory will prevail, and if access is currently specified, the current one will prevail .

For more details Reference:http://apache.chinahtml.com/

Apache Directory directives

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.