1
<?xml version="1.0" encoding="ISO-8859-1"?>
2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5
This file is generated from xml source: DO NOT EDIT
6
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
8
<title>mod_userdir - Apache HTTP Server</title>
9
<link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10
<link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11
<link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12
<link href="../images/favicon.ico" rel="shortcut icon" /></head>
14
<div id="page-header">
15
<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>
16
<p class="apache">Apache HTTP Server Version 2.2</p>
17
<img alt="" src="../images/feather.gif" /></div>
18
<div class="up"><a href="./"><img title="<-" alt="<-" src="../images/left.gif" /></a></div>
20
<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.2</a> > <a href="./">Modules</a></div>
21
<div id="page-content">
22
<div id="preamble"><h1>Apache Module mod_userdir</h1>
24
<p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English"> en </a> |
25
<a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
26
<a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
28
<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>User-specific directories</td></tr>
29
<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
30
<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>userdir_module</td></tr>
31
<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_userdir.c</td></tr></table>
34
<p>This module allows user-specific directories to be accessed using the
35
<code>http://example.com/~user/</code> syntax.</p>
37
<div id="quickview"><h3 class="directives">Directives</h3>
39
<li><img alt="" src="../images/down.gif" /> <a href="#userdir">UserDir</a></li>
43
<li><a href="../urlmapping.html">Mapping URLs to the
45
<li><a href="../howto/public_html.html">public_html
49
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
50
<div class="directive-section"><h2><a name="UserDir" id="UserDir">UserDir</a> <a name="userdir" id="userdir">Directive</a></h2>
51
<table class="directive">
52
<tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the user-specific directories</td></tr>
53
<tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UserDir <em>directory-filename</em></code></td></tr>
54
<tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
55
<tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
56
<tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_userdir</td></tr>
59
<p>The <code class="directive">UserDir</code> directive sets the real
60
directory in a user's home directory to use when a request for a
61
document for a user is received. <em>Directory-filename</em> is
62
one of the following:</p>
65
<li>The name of a directory or a pattern such as those shown
68
<li>The keyword <code>disabled</code>. This turns off
69
<em>all</em> username-to-directory translations except those
70
explicitly named with the <code>enabled</code> keyword (see
73
<li>The keyword <code>disabled</code> followed by a
74
space-delimited list of usernames. Usernames that appear in
75
such a list will <em>never</em> have directory translation
76
performed, even if they appear in an <code>enabled</code>
79
<li>The keyword <code>enabled</code> followed by a
80
space-delimited list of usernames. These usernames will have
81
directory translation performed even if a global disable is
82
in effect, but not if they also appear in a
83
<code>disabled</code> clause.</li>
86
<p>If neither the <code>enabled</code> nor the
87
<code>disabled</code> keywords appear in the
88
<code>Userdir</code> directive, the argument is treated as a
89
filename pattern, and is used to turn the name into a directory
90
specification. A request for
91
<code>http://www.foo.com/~bob/one/two.html</code> will be
95
<tr><th>UserDir directive used</th>
96
<th>Translated path</th></tr>
97
<tr><td>UserDir public_html</td><td>~bob/public_html/one/two.html</td></tr>
98
<tr><td>UserDir /usr/web</td><td>/usr/web/bob/one/two.html</td></tr>
99
<tr><td>UserDir /home/*/www</td><td>/home/bob/www/one/two.html</td></tr>
102
<p>The following directives will send redirects to the client:</p>
105
<tr><th>UserDir directive used</th>
106
<th>Translated path</th></tr>
107
<tr><td>UserDir http://www.foo.com/users</td><td>http://www.foo.com/users/bob/one/two.html</td></tr>
109
http://www.foo.com/*/usr</td><td>http://www.foo.com/bob/usr/one/two.html</td></tr>
111
http://www.foo.com/~*/</td><td>http://www.foo.com/~bob/one/two.html</td></tr>
115
<strong>Be careful when using this directive; for instance,
116
<code>"UserDir ./"</code> would map <code>"/~root"</code> to
117
<code>"/"</code> - which is probably undesirable. It is strongly
118
recommended that your configuration include a "<code>UserDir
119
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
120
more information.</strong>
123
<p>Additional examples:</p>
125
<p>To allow a few users to have <code>UserDir</code> directories, but
126
not anyone else, use the following:</p>
128
<div class="example"><p><code>
129
UserDir disabled<br />
130
UserDir enabled user1 user2 user3
133
<p>To allow most users to have <code>UserDir</code> directories, but
134
deny this to a few, use the following:</p>
136
<div class="example"><p><code>
137
UserDir enabled<br />
138
UserDir disabled user4 user5 user6
141
<p>It is also possible to specify alternative user directories.
142
If you use a command like:</p>
143
<div class="example"><p><code>
144
Userdir public_html /usr/web http://www.foo.com/
146
<p>With a request for http://www.foo.com/~bob/one/two.html, will try to
147
find the page at ~bob/public_html/one/two.html first, then
148
/usr/web/bob/one/two.html, and finally it will send a redirect
149
to http://www.foo.com/bob/one/two.html.</p>
150
<p>If you add a redirect, it must be the last alternative in the list.
151
Apache cannot determine if the redirect succeeded or not, so if you have
152
the redirect earlier in the list, that will always be the alternative
155
<p>User directory substitution is not active by default in versions
156
2.1.4 and later. In earlier versions, <code>UserDir public_html</code>
157
was assumed if no <code class="directive"><a href="#userdir">UserDir</a></code>
158
directive was present.</p>
163
<li><a href="../howto/public_html.html">public_html
168
<div class="bottomlang">
169
<p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English"> en </a> |
170
<a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese"> ja </a> |
171
<a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean"> ko </a></p>
172
</div><div id="footer">
173
<p class="apache">Copyright 2006 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>
174
<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>
b'\\ No newline at end of file'