Deep into the Apache configuration file httpd.conf part of the parameter description

Source: Internet
Author: User
Tags root directory
This article is the Apache configuration file httpd.conf part of the parameter description of the detailed analysis of the introduction, the need for friends to refer to the next

<Directory>...</Directory>--Set access rights for specified directory
<Files>...</Files>--Sets the directive applied to the specified file
Example: Deny access to files that start with '-ht '
<files ~ "^.ht" >
Order Allow,deny
Deny from all
</Files>
<Location>...</Location>-Sets instructions applied to a specific URL that contains instructions that apply only to a specific URL
<VirtualHost>...</VirtualHost>-Configuration of virtual hosts

To set access rights for the root directory
<directory/>
Options FollowSymLinks
AllowOverride None
Order Deny,allow
Deny from all
</Directory>

Options option
All--users can do anything in the directory
EXECCGI--Allows users to execute CGI programs in the directory
FollowSymLinks--Servers can use symbolic links to point to files or directories
Indexes--The server can generate a list of files for this directory
None--access to the directory is not allowed

Allow option--sets the host that allows access to the Apache server
Allow All--Allow all hosts to access
Allow from 201.1.1.1 234.3.4.1--allows host access from a specified IP

Deny option--sets the host that denies access to the Apache server
Deny from all--deny access to all hosts
Deny from 201.1.1.1 234.3.4.1--deny host access from a specified IP
#
Order option--for specifying allow and deny precedence
Order Deny,allow
Deny from all
Allow from 202.44.23.1
Order Allow,deny
Allow from all
Deny from 202.44.23.1
DefaultType Text/plain

Configure the type of default MIME (mutiproposed Internet Mail Extensions, multifunction Internet Messaging Extension Service) and use this default if the server is unsure what type to use.
If the content of your site is mainly text, you'd better use "Text/plain"
If the content on your site is primarily binary (pictures, videos, etc.), you can use "Application/octet-stream"
This allows your browser to display the binaries in the correct way when they receive them, instead of displaying the binary text directly

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.