最後更新: 2015-12-23
介紹
* 此 Module Default: Disable.
<IfModule mod_userdir.c> UserDir disabled #UserDir public_html </IfModule>
Example 設定
UserDir disabled UserDir enabled user1 UserDir public_html
Link
http://example.com/~user1/ "map to" ~user1/public_html
Limit User use it
# To allow a few users to have UserDir directories, but not anyone else, use the following:
UserDir disabled UserDir enabled user1 user2 user3
# To allow most users to have UserDir directories, but deny this to a few, use the following:
UserDir disabled user4 user5 user6
# To enable requests to /~user/ to serve the user's "public_html" directory
restricted to read-only
<Directory /home/*/public_html> AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS> Order allow,deny Allow from all </Limit> # Restrict access controls to all HTTP methods except the named ones # <LimitExcept> and </LimitExcept> are used to enclose a group of access control directives which will then apply to any HTTP access method not listed in the arguments <LimitExcept GET POST OPTIONS> Order deny,allow Deny from all </LimitExcept> </Directory>