Раздел 6. Guides, Tutorials, and HowTos RU EN Пункт 54. Per-user web directories On systems with multiple users, each user can be permitted to have a
web site in their home directory using the Note that, by default, access to these directories is not
enabled. You can enable access when using #Include conf/extra/httpd-userdir.conf in the default config file Per-user web directories
Setting the file path with UserDirThe If a path is given which does not start with a leading slash, it is assumed to be a directory path relative to the home directory of the specified user. Given this configuration: UserDir public_html the URL If a path is given starting with a slash, a directory path will be constructed using that path, plus the username specified. Given this configuration: UserDir /var/html the URL If a path is provided which contains an asterisk (*), a path is used in which the asterisk is replaced with the username. Given this configuration: UserDir /var/www/*/docs the URL Multiple directories or directory paths can also be set. UserDir public_html /var/html For the URL Redirecting to external URLsThe UserDir http://example.org/users/*/ The above example will redirect a request for
Restricting what users are permitted to use this featureUsing 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 UserDir disabled UserDir enabled rbowen krietz See Enabling a cgi directory for each userIn order to give each user their own cgi-bin directory, you can use
a <Directory "/home/*/public_html/cgi-bin/"> Options ExecCGI SetHandler cgi-script </Directory> Then, presuming that Allowing users to alter configurationIf you want to allows users to modify the server configuration in
their web space, they will need to use |
![]() |