mod_userdir.html revision 197983287252fbcd90647091be00349e05fae95f
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<HTML>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<HEAD>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<TITLE>Apache module mod_userdir</TITLE>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead</HEAD>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<BODY
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead BGCOLOR="#FFFFFF"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead TEXT="#000000"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead LINK="#0000FF"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead VLINK="#000080"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead ALINK="#FF0000"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<!--#include virtual="header.html" -->
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<H1 ALIGN="CENTER">Module mod_userdir</H1>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<p>This module provides for user-specific directories.</p>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<P><A
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadHREF="module-dict.html#Status"
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadREL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Status:</STRONG></A> Base
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<BR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadHREF="module-dict.html#SourceFile"
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos KoscoREL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Source File:</STRONG></A> mod_userdir.c
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<BR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadHREF="module-dict.html#ModuleIdentifier"
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadREL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Module Identifier:</STRONG></A> userdir_module
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco</P>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<h2>Directives</h2>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco<UL>
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco<LI><A HREF="#userdir">UserDir</A>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead</UL>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<HR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<H2><A NAME="userdir">UserDir</A> directive</H2>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<!--%plaintext &lt;?INDEX {\tt UserDir} directive&gt; -->
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead HREF="directive-dict.html#Syntax"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead REL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Syntax:</STRONG></A> UserDir <EM>directory/filename</EM><BR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead HREF="directive-dict.html#Default"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead REL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Default:</STRONG></A> <CODE>UserDir public_html</CODE><BR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead HREF="directive-dict.html#Context"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead REL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Context:</STRONG></A> server config, virtual host<BR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead HREF="directive-dict.html#Status"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead REL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Status:</STRONG></A> Base<BR>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<A
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco HREF="directive-dict.html#Module"
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco REL="Help"
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco><STRONG>Module:</STRONG></A> mod_userdir<BR>
d7ee26eb1f58e81a7b99a678461ca0df4b225ad8Lubos Kosco<A
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead HREF="directive-dict.html#Compatibility"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead REL="Help"
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead><STRONG>Compatibility:</STRONG></A> All forms except the <CODE>UserDir
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halsteadpublic_html</CODE> form are only available in Apache 1.1 or above. Use
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halsteadof the <SAMP>enabled</SAMP> keyword, or <SAMP>disabled</SAMP> with a
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halsteadlist of usernames, is only available in Apache 1.3 and above.<P>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead
900f57f08857f08b0f9d0edcace811aed617ad7bScott HalsteadThe UserDir directive sets the real directory in a user's home directory
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halsteadto use when a request for a document for a user is received.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<EM>Directory/filename</EM> is one of the following:
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead</P>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead<UL>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead <LI>The name of a directory or a pattern such as those shown below.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead </LI>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead <LI>The keyword <SAMP>disabled</SAMP>. This turns off <EM>all</EM>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead username-to-directory translations except those explicitly named with
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead the <SAMP>enabled</SAMP> keyword (see below).
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead </LI>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead <LI>The keyword <SAMP>disabled</SAMP> followed by a space-delimited
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead list of usernames. Usernames that appear in such a list will
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead <EM>never</EM> have directory translation performed, even if they
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead appear in an <SAMP>enabled</SAMP> clause.
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead </LI>
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead <LI>The keyword <SAMP>enabled</SAMP> followed by a space-delimited list
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead of usernames. These usernames will have directory translation
900f57f08857f08b0f9d0edcace811aed617ad7bScott Halstead 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:
<PRE>
UserDir public_html -&gt; ~bob/public_html/one/two.html
UserDir /usr/web -&gt; /usr/web/bob/one/two.html
UserDir /home/*/www -&gt; /home/bob/www/one/two.html
</PRE>
The following directives will send redirects to the client:
<PRE>
UserDir http://www.foo.com/users -&gt; http://www.foo.com/users/bob/one/two.html
UserDir http://www.foo.com/*/usr -&gt; http://www.foo.com/bob/usr/one/two.html
UserDir http://www.foo.com/~*/ -&gt; http://www.foo.com/~bob/one/two.html
</PRE>
</P>
<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>