From: Rich Bowen Date: Fri, 19 Jun 2026 12:53:49 +0000 (+0000) Subject: Minor grammar tweaks and style-guide updates. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3103c8e2dcc10eba1e081dfe1aa57bab5ad99e9;p=thirdparty%2Fapache%2Fhttpd.git Minor grammar tweaks and style-guide updates. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1935516 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/docs/manual/howto/public_html.xml b/docs/manual/howto/public_html.xml index 16d05ce103..82ed2de686 100644 --- a/docs/manual/howto/public_html.xml +++ b/docs/manual/howto/public_html.xml @@ -33,17 +33,25 @@ out of the home directory of the user "username", out of the subdirectory specified by the UserDir directive.

-

Note that, by default, access to these directories is not +

By default, access to these directories is not enabled. You can enable access when using UserDir by uncommenting the line:

- - #Include conf/extra/httpd-userdir.conf - + + +#Include conf/extra/httpd-userdir.conf + +

in the default config file conf/httpd.conf, and adapting the httpd-userdir.conf file as necessary, or by including the appropriate directives in a Directory block within the main config file.

+ + Third-party distributions of httpd (from your OS vendor or + package manager) often place the mod_userdir + configuration in a separate file, and may enable it by default. + Check your distribution's documentation for specifics. The examples + in this document assume a default source build of httpd. Mapping URLs to the Filesystem @@ -73,9 +81,11 @@ assumed to be a directory path relative to the home directory of the specified user. Given this configuration:

- + + UserDir public_html - + +

the URL http://example.com/~rbowen/file.html will be translated to the file path @@ -85,9 +95,11 @@ UserDir public_html constructed using that path, plus the username specified. Given this configuration:

- + + UserDir /var/html - + +

the URL http://example.com/~rbowen/file.html will be translated to the file path /var/html/rbowen/file.html

@@ -96,9 +108,11 @@ UserDir /var/html in which the asterisk is replaced with the username. Given this configuration:

- + + UserDir /var/www/*/docs - + +

the URL http://example.com/~rbowen/file.html will be translated to the file path @@ -106,15 +120,17 @@ UserDir /var/www/*/docs

Multiple directories or directory paths can also be set.

- + + UserDir public_html /var/html - + + -

For the URL http://example.com/~rbowen/file.html, - Apache will search for ~rbowen. If it isn't found, - Apache will search for rbowen in /var/html. If - found, the above URL will then be translated to the file path - /var/html/rbowen/file.html

+

The arguments are considered in the order they appear. + For the URL http://example.com/~rbowen/file.html, + httpd will search for ~rbowen. If it isn't found, + httpd will then search for rbowen in /var/html. + The file will be served from whichever location is found first.

@@ -123,9 +139,11 @@ UserDir public_html /var/html

The UserDir directive can be used to redirect user directory requests to external URLs.

- + + UserDir http://example.org/users/*/ - + +

The above example will redirect a request for http://example.com/~bob/abc.html to @@ -139,19 +157,23 @@ UserDir http://example.org/users/*/

Using the syntax shown in the UserDir documentation, you can restrict what users are permitted to use this functionality:

- + + UserDir disabled root jro fish - + +

The configuration above will enable the feature for all users except for those listed in the disabled statement. You can, likewise, disable the feature for all but a few users by using a configuration like the following:

- + + UserDir disabled UserDir enabled rbowen krietz - + +

See UserDir documentation for additional examples.

@@ -161,17 +183,19 @@ UserDir enabled rbowen krietz
Enabling a cgi directory for each user -

In order to give each user their own cgi-bin directory, you can use +

To give each user their own cgi-bin directory, you can use a Directory directive to make a particular subdirectory of a user's home directory cgi-enabled.

- + + <Directory "/home/*/public_html/cgi-bin/"> - Options ExecCGI - SetHandler cgi-script +Options ExecCGI +SetHandler cgi-script </Directory> - + +

Then, presuming that UserDir is set to public_html, a cgi program example.cgi @@ -186,7 +210,7 @@ UserDir enabled rbowen krietz

Allowing users to alter configuration -

If you want to allows users to modify the server configuration in +

If you want to allow users to modify the server configuration in their web space, they will need to use .htaccess files to make these changes. Ensure that you have set AllowOverride to a