Go deep into some parameters in the apache configuration file httpd. conf _ PHP Tutorial

Source: Internet
Author: User
Go deep into some parameters in the apache configuration file httpd. conf. Directory... Directory -- set the access permission for the specified Directory Files... Files -- set the command example that is applied to the specified file: deny access to Files starting with '-ht ~ ^. HtOrd ... -- Set the access permission for the specified directory
... -- Sets the commands applied to the specified file.
Example: access to a file starting with '-ht' is denied.

Order allow, deny
Deny from all

... -- Set the command that applies to a specific URL. the container contains the command that only applies to a specific URL.
... -- Virtual host configuration

Set root directory access permissions

Options FollowSymLinks
AllowOverride None
Order deny, allow
Deny from all

Options
All -- you can perform any operations in this directory.
ExecCGI -- allows the user to execute CGI programs in the directory
FollowSymLinks-the file or directory that the server can point to using symbolic links
Indexes -- the server can generate a list of files in this directory
None -- access to this directory is not allowed

Allow option -- set the host that allows access to the Apache server
Allow from all -- Allow access from all hosts
Allow from 201.1.1.1 234.3.4.1 -- Allow access from a host with a specified IP address

Deny option -- set 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 -- denies access from the host of the specified IP address
#
Order option -- used to specify the Order of allow and deny
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 default MIME (Mutiproposed Internet Mail Extensions, multi-function Internet Mail extended service) type. if the server is not sure what type to use, use this default setting.
If the content of your website is mainly text, you 'd better use "text/plain"
If the content on your website is mainly binary files (images, videos, etc.), you can use "application/octet-stream"
In this way, your browser can display the binary file in the correct way, instead of directly displaying the binary text.

Http://www.bkjia.com/PHPjc/327940.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327940.htmlTechArticleDirectory.../Directory -- set the access permission for the specified directory Files.../Files -- set the command example that is applied to the specified file: deny access to Files starting with '-ht ~ "^ \. Ht" Ord...

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.