mod_userdir.html.en revision 9c1260efa52c82c2a58e5b5f20cd6902563d95f5
97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
97a9a944b5887e91042b019776c41d5dd74557aferikabele<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki This file is generated from xml source: DO NOT EDIT
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
52fff662005b1866a3ff09bb6c902800c5cc6dedjerenkrantz<p class="apache">Apache HTTP Server Version 2.3</p>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
4b5981e276e93df97c34e4da05ca5cf8bbd937dand<a href="http://www.apache.org/">Apache</a> > <a href="http://httpd.apache.org/">HTTP Server</a> > <a href="http://httpd.apache.org/docs/">Documentation</a> > <a href="../">Version 2.3</a> > <a href="./">Modules</a></div>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_userdir.html" title="English"> en </a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
e1e8390280254f7f0580d701e583f670643d4f3fnilgun<a href="/ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
e1e8390280254f7f0580d701e583f670643d4f3fnilgun<a href="/tr/mod/mod_userdir.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>User-specific directories</td></tr>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>userdir_module</td></tr>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_userdir.c</td></tr></table>
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki<p>This module allows user-specific directories to be accessed using the
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<div id="quickview"><h3 class="directives">Directives</h3>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<li><img alt="" src="/images/down.gif" /> <a href="#userdir">UserDir</a></li>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<div class="directive-section"><h2><a name="UserDir" id="UserDir">UserDir</a> <a name="userdir" id="userdir">Directive</a></h2>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the user-specific directories</td></tr>
f61ec47ec494705bd2d02b5b6fe021e5c193f2c8noodl<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UserDir <em>directory-filename</em> [<em>directory-filename</em>] ...
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_userdir</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <p>The <code class="directive">UserDir</code> directive sets the real
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directory in a user's home directory to use when a request for a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive document for a user is received. <em>Directory-filename</em> is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive one of the following:</p>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <li>The name of a directory or a pattern such as those shown
06ba4a61654b3763ad65f52283832ebf058fdf1cslive below.</li>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <em>all</em> username-to-directory translations except those
06ba4a61654b3763ad65f52283832ebf058fdf1cslive explicitly named with the <code>enabled</code> keyword (see
06ba4a61654b3763ad65f52283832ebf058fdf1cslive below).</li>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive space-delimited list of usernames. Usernames that appear in
06ba4a61654b3763ad65f52283832ebf058fdf1cslive such a list will <em>never</em> have directory translation
06ba4a61654b3763ad65f52283832ebf058fdf1cslive performed, even if they appear in an <code>enabled</code>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive clause.</li>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive space-delimited list of usernames. These usernames will have
06ba4a61654b3763ad65f52283832ebf058fdf1cslive directory translation performed even if a global disable is
06ba4a61654b3763ad65f52283832ebf058fdf1cslive in effect, but not if they also appear in a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <code>Userdir</code> directive, the argument is treated as a
06ba4a61654b3763ad65f52283832ebf058fdf1cslive filename pattern, and is used to turn the name into a directory
06ba4a61654b3763ad65f52283832ebf058fdf1cslive specification. A request for
82178a3043043b8813c0d7288a06ca1b7d110d4atakashi <code>http://www.example.com/~bob/one/two.html</code> will be
06ba4a61654b3763ad65f52283832ebf058fdf1cslive translated to:</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>The following directives will send redirects to the client:</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <td>http://www.example.com/users/bob/one/two.html</td></tr>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <td>http://www.example.com/bob/usr/one/two.html</td></tr>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <td>http://www.example.com/~bob/one/two.html</td></tr>
06ba4a61654b3763ad65f52283832ebf058fdf1cslive <strong>Be careful when using this directive; for instance,
3a6531f1fd50efd78381e5800802a1449096781eslive <code>"UserDir ./"</code> would map <code>"/~root"</code> to
3a6531f1fd50efd78381e5800802a1449096781eslive <code>"/"</code> - which is probably undesirable. It is strongly
3a6531f1fd50efd78381e5800802a1449096781eslive recommended that your configuration include a "<code>UserDir
97a9a944b5887e91042b019776c41d5dd74557aferikabele disabled root</code>" declaration. See also the <code class="directive"><a href="/mod/core.html#directory">Directory</a></code> directive and the <a href="/misc/security_tips.html">Security Tips</a> page for
3a6531f1fd50efd78381e5800802a1449096781eslive more information.</strong>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>To allow a few users to have <code>UserDir</code> directories, but
e1e8390280254f7f0580d701e583f670643d4f3fnilgun not anyone else, use the following:</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun UserDir disabled<br />
e1e8390280254f7f0580d701e583f670643d4f3fnilgun UserDir enabled user1 user2 user3
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>To allow most users to have <code>UserDir</code> directories, but
e1e8390280254f7f0580d701e583f670643d4f3fnilgun deny this to a few, use the following:</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun UserDir disabled user4 user5 user6
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>It is also possible to specify alternative user directories.
e1e8390280254f7f0580d701e583f670643d4f3fnilgun If you use a command like:</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>With a request for
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <code>http://www.example.com/~bob/one/two.html</code>, will try to
e1e8390280254f7f0580d701e583f670643d4f3fnilgun find the page at <code>~bob/public_html/one/two.html</code> first, then
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <code>/usr/web/bob/one/two.html</code>, and finally it will send a
e1e8390280254f7f0580d701e583f670643d4f3fnilgun redirect to <code>http://www.example.com/bob/one/two.html</code>.</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>If you add a redirect, it must be the last alternative in the list.
2f46ce2a814d7f2b126dfb9f1b25fd64e2fbdc11rbowen Apache httpd cannot determine if the redirect succeeded or not, so if you have
e1e8390280254f7f0580d701e583f670643d4f3fnilgun the redirect earlier in the list, that will always be the alternative
e1e8390280254f7f0580d701e583f670643d4f3fnilgun that is used.</p>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>User directory substitution is not active by default in versions
e1e8390280254f7f0580d701e583f670643d4f3fnilgun 2.1.4 and later. In earlier versions, <code>UserDir public_html</code>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun was assumed if no <code class="directive"><a href="#userdir">UserDir</a></code>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun directive was present.</p>
a5a2e98043365d3f5a8bb3c3cdfc252a4f11bf02nd <p> Lists of specific enabled and disabled users are replaced, not merged,
2f46ce2a814d7f2b126dfb9f1b25fd64e2fbdc11rbowen <a href="/howto/public_html.html">Per-user web directories tutorial</a>
ad74a0524a06bfe11b7de9e3b4ce7233ab3bd3f7nd<p><span>Available Languages: </span><a href="/en/mod/mod_userdir.html" title="English"> en </a> |
7f5b59ccc63c0c0e3e678a168f09ee6a2f51f9d0nd<a href="/ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
e1e8390280254f7f0580d701e583f670643d4f3fnilgun<a href="/ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a> |
e1e8390280254f7f0580d701e583f670643d4f3fnilgun<a href="/tr/mod/mod_userdir.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
9c1260efa52c82c2a58e5b5f20cd6902563d95f5rbowen<p class="apache">Copyright 2011 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="/faq/">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div>