In-depth explanation of some parameters of the apache configuration file httpd.conf_PHP tutorial

WBOY
Release: 2016-07-21 15:02:04
Original
699 people have browsed it

... -- Set access permissions for the specified directory
... -- Set the instructions that apply to the specified file
Example: Deny access to files starting with '-ht'

Order allow,deny
Deny from all
< ;/Files>
... -- Set directives that apply to specific URLs. The container contains directives that only apply to specific URLs
...< /VirtualHost> -- Virtual host configuration

Set root directory access permissions

Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all

Options
All -- Users can do anything in this directory
ExecCGI -- Allow users to execute CGI programs in the directory
FollowSymLinks -- The server can use symbols The file or directory pointed to by the link
Indexes -- the server can generate a file list for this directory
None -- access to this directory is not allowed

Allow option -- Set the hosts allowed to access the Apache server
Allow from all -- Allow all hosts to access
Allow from 201.1.1.1 234.3.4.1 -- Allow hosts from the specified IP to access

Deny option - Set the host that denies access to the Apache server
Deny from all - Deny access from all hosts
Deny from 201.1.1.1 234.3.4.1 - Deny host access from the specified IP
#
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, Multifunctional Internet Mail Extensions) type. If the server is not sure what type to use, use this default setting.
If the content of your website is mainly text, it is best to use "text/plain"
If the content of your website is mainly binary files (images, videos, etc.), you can use "application/octet- stream"
This allows your browser to display the binary file in the correct way when it receives it, instead of directly displaying the binary text

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327940.htmlTechArticleDirectory.../Directory -- Set access permissions for the specified directory Files.../Files -- Settings Examples of directives that apply to specified files: Deny access to files starting with '-ht' Files ~"^.ht" Ord...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template