[deployment-guide/comm-rel: 570/727] Updated the UserDir directive description.

Jaromir Hradilek jhradile at fedoraproject.org
Tue Oct 19 13:12:55 UTC 2010


commit 0553eb3e3b0cdc54240e8c6fdbbbf009aeb03c0f
Author: Jaromir Hradilek <jhradile at redhat.com>
Date:   Thu Sep 2 17:48:51 2010 +0200

    Updated the UserDir directive description.

 en-US/The_Apache_HTTP_Server.xml |   97 ++++++++++++++++++++++++--------------
 1 files changed, 62 insertions(+), 35 deletions(-)
---
diff --git a/en-US/The_Apache_HTTP_Server.xml b/en-US/The_Apache_HTTP_Server.xml
index 686333d..1a49ff6 100644
--- a/en-US/The_Apache_HTTP_Server.xml
+++ b/en-US/The_Apache_HTTP_Server.xml
@@ -2131,6 +2131,68 @@ ErrorDocument 404 /404-not_found.html</screen>
             </example>
           </listitem>
         </varlistentry>
+        <varlistentry>
+          <term><option>UserDir</option></term>
+          <listitem>
+            <para>
+              The <option>UserDir</option> directive allows you to enable serving content from users' home directories. It takes the following form:
+            </para>
+            <screen>UserDir <replaceable>option</replaceable></screen>
+            <para>
+              The <replaceable>option</replaceable> can be either a name of the directory to look for in user's home directory (typically <option>public_html</option>), or a valid keyword as described in <xref linkend="table-apache-httpdconf-userdir" />. The default option is <option>disabled</option>.
+            </para>
+            <table id="table-apache-httpdconf-userdir">
+              <title>Available <option>UserDir</option> options</title>
+              <tgroup cols="2">
+                <colspec colname="option" colnum="1" colwidth="20*" />
+                <colspec colname="description" colnum="2" colwidth="60*" />
+                <thead>
+                  <row>
+                    <entry>
+                      Option
+                    </entry>
+                    <entry>
+                      Description
+                    </entry>
+                  </row>
+                </thead>
+                <tbody>
+                  <row>
+                    <entry>
+                      <option>enabled</option>&#0160;<replaceable>user</replaceable>&#8230;
+                    </entry>
+                    <entry>
+                      Enables serving content from home directories of given <replaceable>user</replaceable>s.
+                    </entry>
+                  </row>
+                  <row>
+                    <entry>
+                      <option>disabled</option>&#0160;<optional><replaceable>user</replaceable>&#8230;</optional>
+                    </entry>
+                    <entry>
+                      Disables serving content from home directories, either for all users, or, if a space separated list of <replaceable>user</replaceable>s is supplied, for given users only.
+                    </entry>
+                  </row>
+                </tbody>
+              </tgroup>
+            </table>
+            <note>
+              <title>Note: Set the Correct Permissions</title>
+              <para>
+                In order for the web server to access the content, the permissions on relevant directories and files must be set correctly. Make sure that all users are able to access the home directories, and that they can access and read the content of the directory specified by the <option>UserDir</option> directive. For example:
+              </para>
+              <screen>~]# <command>chmod a+x /home/<replaceable>username</replaceable>/</command>
+~]# <command>chmod a+rx /home/<replaceable>username</replaceable>/public_html/</command></screen>
+              <para>
+                All files in the above directory must be set acordingly.
+              </para>
+            </note>
+            <example id="example-apache-httpdconf-userdir">
+              <title>Using the <option>UserDir</option> directive</title>
+              <screen>UserDir public_html</screen>
+            </example>
+          </listitem>
+        </varlistentry>
       </variablelist>
       <formalpara id="s2-apache-indexoptions">
         <title>IndexOptions</title>
@@ -2158,41 +2220,6 @@ ErrorDocument 404 /404-not_found.html</screen>
       <para>
         <command>IndexOptions</command> has a number of other parameters which can be set to control the appearance of server generated directories. The <command>IconHeight</command> and <command>IconWidth</command> parameters require the server to include HTML <command>HEIGHT</command> and <command>WIDTH</command> tags for the icons in server generated webpages. The <command>IconsAreLinks</command> parameter combines the graphical icon with the HTML link anchor, which contains the URL link target.
       </para>
-      <formalpara id="s2-apache-userdir">
-        <title>UserDir</title>
-        <indexterm>
-          <primary><command>UserDir</command></primary>
-          <secondary>Apache configuration directive</secondary>
-        </indexterm>
-        <indexterm>
-          <primary>configuration directives, Apache</primary>
-          <secondary><command>UserDir</command></secondary>
-        </indexterm>
-        <indexterm>
-          <primary><filename>public_html</filename> directories</primary>
-        </indexterm>
-        <indexterm>
-          <primary>users</primary>
-          <secondary>personal HTML directories</secondary>
-        </indexterm>
-        <para>
-          <command>UserDir</command> is the subdirectory within each user's home directory where they should place personal HTML files which are served by the Web server. This directive is set to <option> disable</option> by default.
-        </para>
-      </formalpara>
-      <para>
-        The name for the subdirectory is set to <filename>public_html</filename> in the default configuration. For example, the server might receive the following request:
-      </para>
-      <screen><command>http://<replaceable>example.com</replaceable>/~<replaceable>username</replaceable>/foo.html</command></screen>
-      <para>
-        The server would look for the file:
-      </para>
-      <screen><filename>/home/username/public_html/foo.html</filename></screen>
-      <para>
-        In the above example, <filename>/home/username/</filename> is the user's home directory (note that the default path to users' home directories may vary).
-      </para>
-      <para>
-        Make sure that the permissions on the users' home directories are set correctly. Users' home directories must be set to 0711. The read (r) and execute (x) bits must be set on the users' <filename>public_html</filename> directories (0755 also works). Files that are served in a users' <filename>public_html</filename> directories must be set to at least 0644.
-      </para>
       <formalpara id="s2-apache-virtualhost">
         <title>VirtualHost</title>
         <indexterm>


More information about the docs-commits mailing list