HTTP from Home folders

Stefan Bruda yellowdog-general@lists.terrasoftsolutions.com
Sat Nov 22 11:35:03 2003


Hi.

At 10:17 -0800 on 2003-11-22 Katsu Tanda wrote:
 >
 > I am wonder how I can set apache to allow webpages
 > from my users homefolders in the fashion
 > http://mydomain.com/~user linking to /home/user/html.

I have in my /etc/httpd/conf/commonhttpd.conf the following entry:

#
# UserDir: The name of the directory which is appended onto a user's home
# directory if a ~user request is received.
#
<IfModule mod_userdir.c>
    UserDir /home/httpd/html/home/*
</IfModule>

I prefer to have all the Web pages in /home/httpd hence the above
settings.  If your user home directories reside in /home and you want
for example to have a subdirectory public_html in each user's home to
hold their web pages, then I believe you could write instead

<IfModule mod_userdir.c>
    UserDir /home/*/public_html
</IfModule>

or just

<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

Also see http://httpd.apache.org/docs/mod/mod_userdir.html

Hope this helps,
Stefan

-- 
If it was so, it might be; and if it were so, it would be; but as
it isn't, it ain't. That's logic.
    --Lewis Carroll, Through the Looking-Glass