Name
UserDir
Synopsis
UserDirdirectory
Default: UserDirpublic_html
Server config, virtual host
The basic idea here is that the client is asking for data from a
user’s home directory. He asks for
http://www.butterthlies.com/~peter, which means
“Peter’s home directory on the
computer whose DNS name is
www.butterthlies.com." The
UserDir
directive sets the real directory in a
user’s home directory to use when a request for a
document is received from a user.
directory
is one of the following:
The name of a directory or a pattern such as those shown in the examples that follow.
The keyword
disabled
. This turns off all username-to-directory translations except those explicitly named with theenabled
keyword.The keyword
disabled
followed by a space-delimited list of usernames. Usernames that appear in such a list will never have directory translation performed, even if they appear in anenabled
clause.The keyword
enabled
followed by a space-delimited list of usernames. These usernames will have directory translation performed even if a global disable is in effect, but not if they also appear in adisabled
clause.
If neither the enabled
nor the
disabled
keyword appears in the
UserDir
directive, the argument is treated as a
filename pattern and is used to turn the name into a directory
specification. A request for
http://www.foo.com/~bob/one/two.html will be
translated as follows:
UserDirpublic_html
->~bob/public_html/one/two.html
UserDir/usr/web
->/usr/web/bob/one/two.html
UserDir ...
Get Apache: The Definitive Guide, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.