Build a user called "tom" to experiment with. Use
adduser tom
You also need to have the apache service (httpd) running.
Make sure your httpd.conf file supports User public_html directories.
Look through the /etc/httpd/conf/httpd.conf
file for a line:
UserDir disable
Then look on a little further to find:
#UserDir public_html
Delete the '#' comment character from the front of this line. As you have changed
the configuration remember to reload the httpd service!
When you find this line delete it, or put a # infront of it.
Now create a user called "tom", create a public_html directory
in tom's home directory, and create a file p1.html in the public_html.
The contents of this file should be:
<html>
<body>
<h1>TOM</h1>
<p>
Document body goes here.
</p>
</body>
</html>
Change the appropriate permissions on the /home/tom directories and files
by the minimum amount possible to give apache permission to use the file.
Finally, SELinux is enabled in enforcing mode in Fedora 15 by default. This
means you need even more security to overcome (configure). You need to make
sure that the SELinux boolean httpd_read_user_content is enabled. By default
SELinux is forbidden from reading any file in /home. Check with
getsebool httpd_read_user_content
and if needed set it with
setsebool -P httpd_read_user_content 1
"setsebool" may take 20 or more seconds to run. It will finish, honest!