97a9a944b5887e91042b019776c41d5dd74557aferikabele<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
fd9abdda70912b99b24e3bf1a38f26fde908a74cnd<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type" />
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki This file is generated from xml source: DO NOT EDIT
8c81ebbdeed67059e7a1106d7c617543e901c3abyoshiki XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
96ad5d81ee4a2cc66a4ae19893efc8aa6d06fae7jailletc<title>mod_userdir - Apache HTTP Server Version 2.5</title>
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" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
2e545ce2450a9953665f701bb05350f0d3f26275nd<script src="/style/scripts/prettify.min.js" type="text/javascript">
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
0c4abc32c00611fe1d52c9661f5cc79a3f74c6d4nd<div class="up"><a href="./"><img title="<-" alt="<-" src="/images/left.gif" /></a></div>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<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.5</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> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<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>
30471a4650391f57975f60bbb6e4a90be7b284bfhumbedooh</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
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>
4aa603e6448b99f9371397d439795c91a93637eandUserDir enabled user1 user2 user3</pre>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>To allow most users to have <code>UserDir</code> directories, but
e1e8390280254f7f0580d701e583f670643d4f3fnilgun deny this to a few, use the following:</p>
20f499565e77defe9dab24dd85c02f38a1175855nd <pre class="prettyprint lang-config">UserDir disabled user4 user5 user6</pre>
e1e8390280254f7f0580d701e583f670643d4f3fnilgun <p>It is also possible to specify alternative user directories.
e1e8390280254f7f0580d701e583f670643d4f3fnilgun If you use a command like:</p>
4a56677aad9b66a36f3dc9fddbca8dc1230ad471rbowen <pre class="prettyprint lang-config">UserDir "public_html" "/usr/web" "http://www.example.com/"</pre>
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>
9a58dc6a2b26ec128b1270cf48810e705f1a90dbsf <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> |
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<a href="/tr/mod/mod_userdir.html" hreflang="tr" rel="alternate" title="T�rk�e"> tr </a></p>
727872d18412fc021f03969b8641810d8896820bhumbedooh</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
727872d18412fc021f03969b8641810d8896820bhumbedoohvar comments_shortname = 'httpd';
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedoohvar comments_identifier = 'http://httpd.apache.org/docs/trunk/mod/mod_userdir.html';
0d0ba3a410038e179b695446bb149cce6264e0abnd(function(w, d) {
cc7e1025de9ac63bd4db6fe7f71c158b2cf09fe4humbedooh if (w.location.hostname.toLowerCase() == "httpd.apache.org") {
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread"><\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd var s = d.createElement('script');
ac082aefa89416cbdc9a1836eaf3bed9698201c8humbedooh s.src = 'https://comments.apache.org/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
0d0ba3a410038e179b695446bb149cce6264e0abnd (d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
727872d18412fc021f03969b8641810d8896820bhumbedooh d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
0d0ba3a410038e179b695446bb149cce6264e0abnd})(window, document);
205f749042ed530040a4f0080dbcb47ceae8a374rjung<p class="apache">Copyright 2015 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>
af33a4994ae2ff15bc67d19ff1a7feb906745bf8rbowen<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/quickreference.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
0d0ba3a410038e179b695446bb149cce6264e0abndif (typeof(prettyPrint) !== 'undefined') {
7fec19672a491661b2fe4b29f685bc7f4efa64d4nd prettyPrint();