mod_userdir.html revision db81e057b060e365d840d9a1d35a5797192efa81
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<HTML>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<HEAD>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<TITLE>Apache module mod_userdir</TITLE>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</HEAD>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<BODY
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte BGCOLOR="#FFFFFF"
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte TEXT="#000000"
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte LINK="#0000FF"
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte VLINK="#000080"
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte ALINK="#FF0000"
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<!--#include virtual="header.html" -->
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<H1 ALIGN="CENTER">Module mod_userdir</h1>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteThis module is contained in the <code>mod_userdir.c</code> file, and
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forteis compiled in by default. It provides for user-specific directories.
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<ul>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<li><A HREF="#userdir">UserDir</A>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</ul>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<hr>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<h2><A name="userdir">UserDir</A></h2>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<!--%plaintext &lt;?INDEX {\tt UserDir} directive&gt; -->
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<strong>Syntax:</strong> UserDir <em>directory/filename</em><br>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<strong>Default:</strong> <code>UserDir public_html</code><br>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<Strong>Context:</strong> server config, virtual host<br>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<strong>Status:</strong> Base<br>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<strong>Module:</strong> mod_userdir<br>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<strong>Compatibility:</strong> All forms except the <code>UserDir
450396635f70344c58b6b1e4db38cf17ff34445cJohn Fortepublic_html</code> form are only available in Apache 1.1 or above. Use
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forteof the <SAMP>enabled</SAMP> keyword, or <SAMP>disabled</SAMP> with a
450396635f70344c58b6b1e4db38cf17ff34445cJohn Fortelist of usernames, is only available in Apache 1.3 and above.<p>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteThe UserDir directive sets the real directory in a user's home directory
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forteto use when a request for a document for a user is received.
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<em>Directory/filename</em> is one of the following:
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</P>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<UL>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte <LI>The name of a directory or a pattern such as those shown below.
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte </LI>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte <LI>The keyword <SAMP>disabled</SAMP>. This turns off <EM>all</EM>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte username-to-directory translations except those explicitly named with
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte the <SAMP>enabled</SAMP> keyword (see below).
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte </LI>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte <LI>The keyword <SAMP>disabled</SAMP> followed by a space-delimited
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte list of usernames. Usernames that appear in such a list will
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte <EM>never</EM> have directory translation performed, even if they
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte appear in an <SAMP>enabled</SAMP> clause.
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte </LI>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte <LI>The keyword <SAMP>enabled</SAMP> followed by a space-delimited list
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte of usernames. These usernames will have directory translation
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte performed even if a global disable is in effect, but not if they also
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte appear in a <SAMP>disabled</SAMP> clause.
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte </LI>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</UL>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<P>
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteIf neither the <SAMP>enabled</SAMP> nor the <SAMP>disabled</SAMP>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Fortekeywords appear in the <SAMP>Userdir</SAMP> directive, the argument is
450396635f70344c58b6b1e4db38cf17ff34445cJohn Fortetreated as a filename pattern, and is used to turn the name into a
450396635f70344c58b6b1e4db38cf17ff34445cJohn Fortedirectory specification. A request for
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<code>http://www.foo.com/~bob/one/two.html</code> will be translated to:
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<pre>
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteUserDir public_html -&gt; ~bob/public_html/one/two.html
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteUserDir /usr/web -&gt; /usr/web/bob/one/two.html
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteUserDir /home/*/www -&gt; /home/bob/www/one/two.html
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</pre>
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteThe following directives will send redirects to the client:
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<pre>
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteUserDir http://www.foo.com/users -&gt; http//www.foo.com/users/bob/one/two.html
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteUserDir http://www.foo.com/*/usr -&gt; http://www.foo.com/bob/usr/one/two.html
450396635f70344c58b6b1e4db38cf17ff34445cJohn ForteUserDir http://www.foo.com/~*/ -&gt; http://www.foo.com/~bob/one/two.html
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</pre>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte</P>
450396635f70344c58b6b1e4db38cf17ff34445cJohn Forte<BLOCKQUOTE>
<STRONG>
Be careful when using this directive; for instance,
<SAMP>&quot;UserDir&nbsp;./&quot;</SAMP> would map
<SAMP>&quot;/~root&quot;</SAMP> to
<SAMP>&quot;/&quot;</SAMP> - which is probably undesirable. If you are
running Apache 1.3 or above, it is strongly recommended that your
configuration include a
&quot;<SAMP>UserDir&nbsp;disabled&nbsp;root</SAMP>&quot; declaration.
See also
the
<A
HREF="core.html#directory"
>&lt;Directory&gt;</A>
directive and the
<A
HREF="/misc/security_tips.html"
>Security Tips</A>
page for more information.
</STRONG>
</BLOCKQUOTE>
<!--#include virtual="footer.html" -->
</BODY>
</HTML>