ApacheHTTPServer (3) -- configure the basic container of the fragment & lt; IfDefine & gt; and apply it only when the command line parameters have corresponding definitions. For example: & lt; IfDefineClosedForNow & gt; Redirect/http://otherserver.example.com/</ifdefine>only use Apach Apache HTTP Server (3) -- configure the basic container of the segment
It is applied only when the command line parameters have corresponding definitions. For example: Redirect/http://otherserver.example.com/ The application is only applicable when you start with the Apache2-DClosedForNow command. It is applied only when the corresponding module is available. For example: MimeMagicFile conf/magic It is valid only when the module mod_mime_magic is available. The application is based on the server version. For example: = 2.4> # this happens only in versions greater or # equal 2.4.0. www.2cto.com File system container Specify a directory and apply the command to the directory and all its subdirectories. this is the same as the. htaccess file.
For example: Options + Indexes Specifies the file name, regardless of the directory in which it is located. For example: Require all denied And It can also be used together: Require all denied Applies to all files in the specified directory and its sub-directory named "private.html. The web space container is different from the file system, which mainly specifies the path in the URL. For example: Require all deniedIt can match all URL paths starting with/private, such as http://yoursite.example.com/private?http: // yoursite.example.com/private123#and http://yoursite.example.com/private/dir/file.html. Www.2cto.com The specified file may not exist in the file system and may be generated based on the database. The general principle is: And Do not use . When there are overlapping paths, we should pay attention to the order. for example, we must write the following: The opposite sequence should be used: Alias/foo/bar/srv/www/uncommon/barAlias/foo/srv/www/common/foo ProxyPass: proxyPass/special-area http://special.example.com smax = 5 max = 10 ProxyPass/balancer: // mycluster/stickysession = JSESSIONID | jsessionid nofailover = On wildcard and regular expression , , And Can use the shell-style wildcard: "*" to represent any string; "?" Represents any single character; "[seq]" represents any character that appears in seq. "/" Does not match any wildcards and must be specified explicitly. For example: Options Indexes The commands www.2cto.com also have the corresponding regular expression commands: , , And . For example: Require all denied Logical expression The Command selects an application based on the logical expression. For example: Require all denied When the HTTP Referer header is not started at http://www.example.com. Embedded in , , And . Virtual host The container targets a specific host. Proxy And Container, which is applied to the site of the proxy server through mod_proxy. For example: Require all granted Prevent the proxy server from being used to access http://www.example.com /. Valid instructions for www.2cto.com are usually Valid commands can also be found in , , , , , , And . But there are also the following exceptions:
AllowOverride can only be . The FollowSymLinks and SymLinksIfOwnerMatch options are only available in And in the. htaccess file. The Options command cannot be And . By yourtommy
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.