1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="generator" content="HTML Tidy, see www.w3.org" />
<title>Apache module mod_userdir</title>
</head>
<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#000080" alink="#FF0000">
<div align="CENTER">
<img src="../images/sub.gif" alt="[APACHE DOCUMENTATION]" />
<h3>Apache HTTP Server Version 1.3</h3>
</div>
<h1 align="CENTER">Module mod_userdir</h1>
<p>This module provides for user-specific directories.</p>
<p><a href="module-dict.html#Status"
rel="Help"><strong>Status:</strong></a> Base<br />
<a href="module-dict.html#SourceFile"
rel="Help"><strong>Source File:</strong></a>
mod_userdir.c<br />
<a href="module-dict.html#ModuleIdentifier"
rel="Help"><strong>Module Identifier:</strong></a>
userdir_module</p>
<h2>Directives</h2>
<ul>
<li><a href="#userdir">UserDir</a></li>
</ul>
<hr />
<h2><a id="userdir" name="userdir">UserDir</a> directive</h2>
<a href="directive-dict.html#Syntax"
rel="Help"><strong>Syntax:</strong></a> UserDir
<em>directory-filename</em><br />
<a href="directive-dict.html#Default"
rel="Help"><strong>Default:</strong></a> <code>UserDir
public_html</code><br />
<a href="directive-dict.html#Context"
rel="Help"><strong>Context:</strong></a> server config, virtual
host<br />
<a href="directive-dict.html#Status"
rel="Help"><strong>Status:</strong></a> Base<br />
<a href="directive-dict.html#Module"
rel="Help"><strong>Module:</strong></a> mod_userdir<br />
<a href="directive-dict.html#Compatibility"
rel="Help"><strong>Compatibility:</strong></a> All forms except
the <code>UserDir public_html</code> form are only available in
Apache 1.1 or above. Use of the <samp>enabled</samp> keyword,
or <samp>disabled</samp> with a list of usernames, is only
available in Apache 1.3 and above.
<p>The UserDir directive sets the real directory in a user's
home directory to use when a request for a document for a user
is received. <em>Directory-filename</em> is one of the
following:</p>
<ul>
<li>The name of a directory or a pattern such as those shown
below.</li>
<li>The keyword <samp>disabled</samp>. This turns off
<em>all</em> username-to-directory translations except those
explicitly named with the <samp>enabled</samp> keyword (see
below).</li>
<li>The keyword <samp>disabled</samp> followed by a
space-delimited list of usernames. Usernames that appear in
such a list will <em>never</em> have directory translation
performed, even if they appear in an <samp>enabled</samp>
clause.</li>
<li>The keyword <samp>enabled</samp> 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 a
<samp>disabled</samp> clause.</li>
</ul>
<p>If neither the <samp>enabled</samp> nor the
<samp>disabled</samp> keywords appear in the
<samp>Userdir</samp> directive, the argument is treated as a
filename pattern, and is used to turn the name into a directory
specification. A request for
<code>http://www.foo.com/~bob/one/two.html</code> will be
translated to:</p>
<pre>
UserDir public_html -> ~bob/public_html/one/two.html
UserDir /usr/web -> /usr/web/bob/one/two.html
UserDir /home/*/www -> /home/bob/www/one/two.html
</pre>
<p>The following directives will send redirects to the
client:</p>
<pre>
UserDir http://www.foo.com/users -> http://www.foo.com/users/bob/one/two.html
UserDir http://www.foo.com/*/usr -> http://www.foo.com/bob/usr/one/two.html
UserDir http://www.foo.com/~*/ -> http://www.foo.com/~bob/one/two.html
</pre>
<blockquote>
<strong>Be careful when using this directive; for instance,
<samp>"UserDir ./"</samp> would map
<samp>"/~root"</samp> to <samp>"/"</samp> - which is probably
undesirable. If you are running Apache 1.3 or above, it is
strongly recommended that your configuration include a
"<samp>UserDir disabled root</samp>" declaration.
See also the <a
href="core.html#directory"><Directory></a> directive
and the <a href="../misc/security_tips.html">Security
Tips</a> page for more information.</strong>
</blockquote>
<p>Additional examples:</p>
<p>To allow a few users to have <code>UserDir</code> directories, but
not anyone else, use the following:</p>
<pre>
UserDir disabled
UserDir enabled user1 user2 user3
</pre>
<p>To allow most users to have <code>UserDir</code> directories, but
deny this to a few, use the following:</p>
<pre>
UserDir enabled
UserDir disabled user4 user5 user6
</pre>
<hr />
<h3 align="CENTER">Apache HTTP Server Version 1.3</h3>
<a href="./"><img src="../images/index.gif" alt="Index" /></a>
<a href="../"><img src="../images/home.gif" alt="Home" /></a>
</body>
</html>
|