mod_userdir.html revision 197983287252fbcd90647091be00349e05fae95f
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<HTML>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<HEAD>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<TITLE>Apache module mod_userdir</TITLE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</HEAD>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<BODY
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync BGCOLOR="#FFFFFF"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync TEXT="#000000"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync LINK="#0000FF"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync VLINK="#000080"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync ALINK="#FF0000"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<!--#include virtual="header.html" -->
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<H1 ALIGN="CENTER">Module mod_userdir</H1>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<p>This module provides for user-specific directories.</p>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<P><A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncHREF="module-dict.html#Status"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncREL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Status:</STRONG></A> Base
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncHREF="module-dict.html#SourceFile"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncREL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Source File:</STRONG></A> mod_userdir.c
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncHREF="module-dict.html#ModuleIdentifier"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncREL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Module Identifier:</STRONG></A> userdir_module
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</P>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<h2>Directives</h2>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<UL>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<LI><A HREF="#userdir">UserDir</A>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</UL>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<HR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<H2><A NAME="userdir">UserDir</A> directive</H2>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<!--%plaintext &lt;?INDEX {\tt UserDir} directive&gt; -->
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="directive-dict.html#Syntax"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync REL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Syntax:</STRONG></A> UserDir <EM>directory/filename</EM><BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="directive-dict.html#Default"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync REL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Default:</STRONG></A> <CODE>UserDir public_html</CODE><BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="directive-dict.html#Context"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync REL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Context:</STRONG></A> server config, virtual host<BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="directive-dict.html#Status"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync REL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Status:</STRONG></A> Base<BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="directive-dict.html#Module"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync REL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Module:</STRONG></A> mod_userdir<BR>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="directive-dict.html#Compatibility"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync REL="Help"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync><STRONG>Compatibility:</STRONG></A> All forms except the <CODE>UserDir
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncpublic_html</CODE> form are only available in Apache 1.1 or above. Use
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncof the <SAMP>enabled</SAMP> keyword, or <SAMP>disabled</SAMP> with a
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsynclist of usernames, is only available in Apache 1.3 and above.<P>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncThe UserDir directive sets the real directory in a user's home directory
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncto use when a request for a document for a user is received.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<EM>Directory/filename</EM> is one of the following:
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</P>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<UL>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <LI>The name of a directory or a pattern such as those shown below.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync </LI>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <LI>The keyword <SAMP>disabled</SAMP>. This turns off <EM>all</EM>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync username-to-directory translations except those explicitly named with
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync the <SAMP>enabled</SAMP> keyword (see below).
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync </LI>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <LI>The keyword <SAMP>disabled</SAMP> followed by a space-delimited
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync list of usernames. Usernames that appear in such a list will
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <EM>never</EM> have directory translation performed, even if they
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync appear in an <SAMP>enabled</SAMP> clause.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync </LI>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <LI>The keyword <SAMP>enabled</SAMP> followed by a space-delimited list
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync of usernames. These usernames will have directory translation
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync performed even if a global disable is in effect, but not if they also
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync appear in a <SAMP>disabled</SAMP> clause.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync </LI>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</UL>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<P>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncIf neither the <SAMP>enabled</SAMP> nor the <SAMP>disabled</SAMP>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsynckeywords appear in the <SAMP>Userdir</SAMP> directive, the argument is
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsynctreated as a filename pattern, and is used to turn the name into a
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncdirectory specification. A request for
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<CODE>http://www.foo.com/~bob/one/two.html</CODE> will be translated to:
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<PRE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncUserDir public_html -&gt; ~bob/public_html/one/two.html
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncUserDir /usr/web -&gt; /usr/web/bob/one/two.html
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncUserDir /home/*/www -&gt; /home/bob/www/one/two.html
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</PRE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncThe following directives will send redirects to the client:
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<PRE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncUserDir http://www.foo.com/users -&gt; http://www.foo.com/users/bob/one/two.html
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncUserDir http://www.foo.com/*/usr -&gt; http://www.foo.com/bob/usr/one/two.html
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsyncUserDir http://www.foo.com/~*/ -&gt; http://www.foo.com/~bob/one/two.html
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</PRE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</P>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<BLOCKQUOTE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <STRONG>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync Be careful when using this directive; for instance,
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <SAMP>&quot;UserDir&nbsp;./&quot;</SAMP> would map
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <SAMP>&quot;/~root&quot;</SAMP> to
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <SAMP>&quot;/&quot;</SAMP> - which is probably undesirable. If you are
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync running Apache 1.3 or above, it is strongly recommended that your
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync configuration include a
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync &quot;<SAMP>UserDir&nbsp;disabled&nbsp;root</SAMP>&quot; declaration.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync See also
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="core.html#directory"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync >&lt;Directory&gt;</A>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync directive and the
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync <A
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync HREF="/misc/security_tips.html"
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync >Security Tips</A>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync page for more information.
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync </STRONG>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</BLOCKQUOTE>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync<!--#include virtual="footer.html" -->
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</BODY>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync</HTML>
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync
8c3d541c7ee7442f570b22eca3d82808b35b0385vboxsync