Example: Deny access to files starting with '-ht'
Order allow,deny
Deny from all
< ;/Files>
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