mod_userdir.html revision 618d2847990e59c6fa82b74b160453e1048a2957
10139N/A<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
10139N/A<HTML>
10139N/A<HEAD>
10139N/A<TITLE>Apache module mod_userdir</TITLE>
10139N/A</HEAD>
16307N/A
10139N/A<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
10139N/A<BODY
10139N/A BGCOLOR="#FFFFFF"
17823N/A TEXT="#000000"
10139N/A LINK="#0000FF"
10139N/A VLINK="#000080"
10139N/A ALINK="#FF0000"
10139N/A>
10139N/A<!--#include virtual="header.html" -->
10139N/A<H1 ALIGN="CENTER">Module mod_userdir</H1>
18688N/A
18688N/AThis module is contained in the <CODE>mod_userdir.c</CODE> file, and
10139N/Ais compiled in by default. It provides for user-specific directories.
19013N/A
10139N/A
10139N/A<UL>
12856N/A<LI><A HREF="#userdir">UserDir</A>
19140N/A</UL>
10139N/A<HR>
10139N/A
16401N/A
10139N/A<h2><A name="userdir">UserDir</A></h2>
16401N/A<!--%plaintext &lt;?INDEX {\tt UserDir} directive&gt; -->
10139N/A<A
11379N/A HREF="directive-dict.html#Syntax"
16307N/A REL="Help"
13384N/A><STRONG>Syntax:</STRONG></A> UserDir <EM>directory/filename</EM><BR>
10139N/A<A
12032N/A HREF="directive-dict.html#Default"
12032N/A REL="Help"
12032N/A><STRONG>Default:</STRONG></A> <CODE>UserDir public_html</CODE><BR>
12032N/A<A
12032N/A HREF="directive-dict.html#Context"
10139N/A REL="Help"
10139N/A><STRONG>Context:</STRONG></A> server config, virtual host<BR>
10139N/A<A
10139N/A HREF="directive-dict.html#Status"
10139N/A REL="Help"
10139N/A><STRONG>Status:</STRONG></A> Base<BR>
10139N/A<A
10139N/A HREF="directive-dict.html#Module"
10139N/A REL="Help"
10139N/A><STRONG>Module:</STRONG></A> mod_userdir<BR>
19126N/A<A
10139N/A HREF="directive-dict.html#Compatibility"
19126N/A REL="Help"
10139N/A><STRONG>Compatibility:</STRONG></A> All forms except the <CODE>UserDir
10139N/Apublic_html</CODE> form are only available in Apache 1.1 or above. Use
10139N/Aof the <SAMP>enabled</SAMP> keyword, or <SAMP>disabled</SAMP> with a
10139N/Alist of usernames, is only available in Apache 1.3 and above.<P>
10139N/A
10139N/AThe UserDir directive sets the real directory in a user's home directory
10139N/Ato use when a request for a document for a user is received.
10139N/A<EM>Directory/filename</EM> is one of the following:
10139N/A</P>
10139N/A<UL>
10139N/A <LI>The name of a directory or a pattern such as those shown below.
10139N/A </LI>
10139N/A <LI>The keyword <SAMP>disabled</SAMP>. This turns off <EM>all</EM>
10139N/A username-to-directory translations except those explicitly named with
10139N/A the <SAMP>enabled</SAMP> keyword (see below).
10139N/A </LI>
13423N/A <LI>The keyword <SAMP>disabled</SAMP> followed by a space-delimited
10139N/A list of usernames. Usernames that appear in such a list will
10139N/A <EM>never</EM> have directory translation performed, even if they
10139N/A appear in an <SAMP>enabled</SAMP> clause.
10139N/A </LI>
10139N/A <LI>The keyword <SAMP>enabled</SAMP> followed by a space-delimited list
10139N/A of usernames. These usernames will have directory translation
10139N/A performed even if a global disable is in effect, but not if they also
10139N/A appear in a <SAMP>disabled</SAMP> clause.
10139N/A </LI>
10139N/A</UL>
10139N/A<P>
10139N/AIf neither the <SAMP>enabled</SAMP> nor the <SAMP>disabled</SAMP>
10139N/Akeywords appear in the <SAMP>Userdir</SAMP> directive, the argument is
10139N/Atreated as a filename pattern, and is used to turn the name into a
10139N/Adirectory specification. A request for
10139N/A<CODE>http://www.foo.com/~bob/one/two.html</CODE> will be translated to:
10139N/A<PRE>
10139N/AUserDir public_html -&gt; ~bob/public_html/one/two.html
10139N/AUserDir /usr/web -&gt; /usr/web/bob/one/two.html
10139N/AUserDir /home/*/www -&gt; /home/bob/www/one/two.html
10139N/A</PRE>
10139N/AThe following directives will send redirects to the client:
10139N/A<PRE>
10139N/AUserDir http://www.foo.com/users -&gt; http//www.foo.com/users/bob/one/two.html
10139N/AUserDir http://www.foo.com/*/usr -&gt; http://www.foo.com/bob/usr/one/two.html
10139N/AUserDir http://www.foo.com/~*/ -&gt; http://www.foo.com/~bob/one/two.html
16307N/A</PRE>
10139N/A</P>
10139N/A<BLOCKQUOTE>
16307N/A <STRONG>
12032N/A Be careful when using this directive; for instance,
10139N/A <SAMP>&quot;UserDir&nbsp;./&quot;</SAMP> would map
10139N/A <SAMP>&quot;/~root&quot;</SAMP> to
10139N/A <SAMP>&quot;/&quot;</SAMP> - which is probably undesirable. If you are
10139N/A running Apache 1.3 or above, it is strongly recommended that your
10139N/A configuration include a
10139N/A &quot;<SAMP>UserDir&nbsp;disabled&nbsp;root</SAMP>&quot; declaration.
10139N/A See also
10139N/A the
10139N/A <A
10139N/A HREF="core.html#directory"
10139N/A >&lt;Directory&gt;</A>
10139N/A directive and the
10139N/A <A
10139N/A HREF="/misc/security_tips.html"
10139N/A >Security Tips</A>
17401N/A page for more information.
17401N/A </STRONG>
17401N/A</BLOCKQUOTE>
17401N/A
17156N/A<!--#include virtual="footer.html" -->
10139N/A</BODY>
12032N/A</HTML>
12032N/A
12032N/A