Site Source Files Directory
F:\01.prj\site\static_html
F:\01.prj\site\static_html
Open apache_http.conf
1. Modify the Site Directory
Error 1
Alias/test f:/01.prj/site/static_html
<directory f:/01.prj/site/static_html>
Order Allow,deny
Allow from all
</Directory>
Workaround:
The following page describes http://blog.sina.com.cn/s/blog_4ab5f9e50100p5kg.html
The <Directory> of Apache (2006-02-20-19:31:51)
Reproduced
Label:
Zatan
Category: Web
<Directory>Instructions
<Directory>and </Directory> used to encapsulate a set of instructions that take effect only on a directory and its subdirectories. Any instruction that can be used in the context of a directory is allowed in this case. The Directory-path can be a full path to a directory, or a wildcard string that contains the Unix shell matching syntax. In a wildcard string, "?" Matches any single character, "*" matches any sequence of characters. You can also use "[]" to determine the range of characters. None of the above wildcards can match the "/" character. So <Directory public_html> they can match correctly. For example:
<Directory /usr/local/httpd/htdocs>
Options Indexes FollowSymLinks
</Directory>
When using the directory-path parameter, note that they must be consistent with the file system path that Apache uses to access the files. Commands given to a specific <Directory> will not be able to take effect on the same directory file that is pointed through different paths, such as the path generated by another symbolic connection.
An extended regular expression can also be used by attaching a ~ character. For example:
<Directory ~ "^/www/.*/[0-9]{3}">
Will match all 3-digit directories under/www/.
If there is more than one (non-regular expression) directory configuration segment that conforms to the directory (or its parent directory) that contains a document, the directive is applied in the rules that are applied first in the shortest directory. and miscellaneous to the instructions in the. htaccess file. For example, in
<Directory />
AllowOverride None
</Directory>
<Directory /home/>
AllowOverride FileInfo
</Directory>
, the steps to access /home/web/dir/doc.html the document are as follows:
- Application Directives
AllowOverride None (disable .htaccess files).
- Application Directives
AllowOverride FileInfo (for directories /home/web ).
- Apply all
/home/web/.htaccess of the fileinfo directives in
Regular expressions will be considered after all normal configuration segments have been applied. All regular expressions are validated according to the order in which they appear in the configuration file. For example, the following configuration:
<Directory ~ abc$>
... directives here ...
</Directory>
Regular expression configuration segments will be considered after all normal <Directory> and .htaccess file applications. So the regular expression will be matched /home/abc/public_html/abc and applied.
Please note: The default access rights for Apache to <directory/> are Allow from All . This means that Apache will servo any file that is mapped through the URL. We recommend that you block this configuration as follows:
<Directory />
Order Deny,Allow
Deny from All
</Directory>
In general, the directory subsections appear in the access.conf file, but they may also appear in any configuration file. <Directory>directives cannot be nested, nor can they appear in <Limit> or in <LimitExcept> subsections.
Apache Quick Configure Easy Web site