upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / docs / manual / mod / mod_userdir.html.en
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
7       -->
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>
13 <body>
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.0</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.0</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_userdir</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English">&nbsp;en&nbsp;</a> |
25 <a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
26 <a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
27 <a href="../tr/mod/mod_userdir.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
28 </div>
29 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>User-specific directories</td></tr>
30 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Base</td></tr>
31 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>userdir_module</td></tr>
32 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_userdir.c</td></tr></table>
33 <h3>Summary</h3>
34
35 <p>This module allows user-specific directories to be accessed using the
36 <code>http://example.com/~user/</code> syntax.</p>
37 </div>
38 <div id="quickview"><h3 class="directives">Directives</h3>
39 <ul id="toc">
40 <li><img alt="" src="../images/down.gif" /> <a href="#userdir">UserDir</a></li>
41 </ul>
42 <h3>See also</h3>
43 <ul class="seealso">
44 <li><a href="../urlmapping.html">Mapping URLs to the
45 Filesystem</a></li>
46 <li><a href="../howto/public_html.html">public_html
47 tutorial</a></li>
48 </ul></div>
49
50 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
51 <div class="directive-section"><h2><a name="UserDir" id="UserDir">UserDir</a> <a name="userdir" id="userdir">Directive</a></h2>
52 <table class="directive">
53 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Location of the user-specific directories</td></tr>
54 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>UserDir <em>directory-filename</em></code></td></tr>
55 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>UserDir public_html</code></td></tr>
56 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host</td></tr>
57 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Base</td></tr>
58 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_userdir</td></tr>
59 </table>
60
61     <p>The <code class="directive">UserDir</code> directive sets the real
62     directory in a user's home directory to use when a request for a
63     document for a user is received. <em>Directory-filename</em> is
64     one of the following:</p>
65
66     <ul>
67       <li>The name of a directory or a pattern such as those shown
68       below.</li>
69
70       <li>The keyword <code>disabled</code>. This turns off
71       <em>all</em> username-to-directory translations except those
72       explicitly named with the <code>enabled</code> keyword (see
73       below).</li>
74
75       <li>The keyword <code>disabled</code> followed by a
76       space-delimited list of usernames. Usernames that appear in
77       such a list will <em>never</em> have directory translation
78       performed, even if they appear in an <code>enabled</code>
79       clause.</li>
80
81       <li>The keyword <code>enabled</code> followed by a
82       space-delimited list of usernames. These usernames will have
83       directory translation performed even if a global disable is
84       in effect, but not if they also appear in a
85       <code>disabled</code> clause.</li>
86     </ul>
87
88     <p>If neither the <code>enabled</code> nor the
89     <code>disabled</code> keywords appear in the
90     <code>Userdir</code> directive, the argument is treated as a
91     filename pattern, and is used to turn the name into a directory
92     specification. A request for
93     <code>http://www.foo.com/~bob/one/two.html</code> will be
94     translated to:</p>
95
96 <table>
97 <tr><th>UserDir directive used</th>
98 <th>Translated path</th></tr>
99 <tr><td>UserDir public_html</td><td>~bob/public_html/one/two.html</td></tr>
100 <tr><td>UserDir /usr/web</td><td>/usr/web/bob/one/two.html</td></tr>
101 <tr><td>UserDir /home/*/www</td><td>/home/bob/www/one/two.html</td></tr>
102 </table>
103
104     <p>The following directives will send redirects to the client:</p> 
105
106 <table>
107 <tr><th>UserDir directive used</th>
108 <th>Translated path</th></tr>
109 <tr><td>UserDir http://www.foo.com/users</td><td>http://www.foo.com/users/bob/one/two.html</td></tr>
110 <tr><td>UserDir
111 http://www.foo.com/*/usr</td><td>http://www.foo.com/bob/usr/one/two.html</td></tr>
112 <tr><td>UserDir
113 http://www.foo.com/~*/</td><td>http://www.foo.com/~bob/one/two.html</td></tr>
114 </table> 
115
116 <div class="note">
117       <strong>Be careful when using this directive; for instance,
118       <code>"UserDir ./"</code> would map <code>"/~root"</code> to
119       <code>"/"</code> - which is probably undesirable. It is strongly
120       recommended that your configuration include a "<code>UserDir
121       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
122       more information.</strong>
123 </div>
124
125 <p>Additional examples:</p>
126
127 <p>To allow a few users to have <code>UserDir</code> directories, but
128 not anyone else, use the following:</p>
129
130 <div class="example"><p><code>
131 UserDir disabled<br />
132 UserDir enabled user1 user2 user3
133 </code></p></div>
134
135 <p>To allow most users to have <code>UserDir</code> directories, but
136 deny this to a few, use the following:</p>
137
138 <div class="example"><p><code>
139 UserDir enabled<br />
140 UserDir disabled user4 user5 user6
141 </code></p></div>
142
143 <p>It is also possible to specify alternative user directories.
144 If you use a command like:</p>
145 <div class="example"><p><code>
146 Userdir public_html /usr/web http://www.foo.com/
147 </code></p></div>
148 <p>With a request for http://www.foo.com/~bob/one/two.html, will try to 
149 find the page at ~bob/public_html/one/two.html first, then
150 /usr/web/bob/one/two.html, and finally it will send a redirect
151 to http://www.foo.com/bob/one/two.html.</p>
152 <p>If you add a redirect, it must be the last alternative in the list.
153 Apache cannot determine if the redirect succeeded or not, so if you have
154 the redirect earlier in the list, that will always be the alternative
155 that is used.</p>
156
157
158 <h3>See also</h3>
159 <ul>
160 <li><a href="../howto/public_html.html">public_html
161 tutorial</a></li>
162 </ul>
163 </div>
164 </div>
165 <div class="bottomlang">
166 <p><span>Available Languages: </span><a href="../en/mod/mod_userdir.html" title="English">&nbsp;en&nbsp;</a> |
167 <a href="../ja/mod/mod_userdir.html" hreflang="ja" rel="alternate" title="Japanese">&nbsp;ja&nbsp;</a> |
168 <a href="../ko/mod/mod_userdir.html" hreflang="ko" rel="alternate" title="Korean">&nbsp;ko&nbsp;</a> |
169 <a href="../tr/mod/mod_userdir.html" hreflang="tr" rel="alternate" title="Türkçe">&nbsp;tr&nbsp;</a></p>
170 </div><div id="footer">
171 <p class="apache">Copyright 2009 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>
172 <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>
173 </body></html>