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