httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perplexer" <>
Subject Apache "Forbidden"
Date Mon, 28 Jan 2002 19:55:00 GMT
Hello everybody.

I have just installed Red Hat Linux 7.2 and Apache 1.3.20 Server came with it.
It's running OK, but there is one thing that I would like to solve.
I understand there are initially two places where a user can have his web
files stored, /home/username/public_html or /var/www/html/username. If the files
are stored in his homedir, his web site will be reachable through the URL
containing a ~ ( If his files are located
in /var/www/html/username, his web site will be reachable through the same
URL, but without the ~ (

Now I noticed that if there is an index.html file in user's home dir
(/home/username/public_html) then the server will read that index.html file
and display the page normally when I open If
however there is no index.html file in this user's home dir, the server will
reply with an error message "Forbidden You don't have permission to access
/~username on this server." when I try to open

This actually suits me because if I unintentionally forget to upload the
index.html file or if I delete or rename by mistake, the server will simply
display the "Forbidden" message instead of listing the files that are in the
home dir on the "Index of /~username" page.

The problem is, this does not work the same in /var/www/html/username dir
if I decide to put the web site there so that I don't have to type the ~ in
the URL. If I forget to upload the index.html file there, the server will not
display the "Forbidden" message but will display the "List of /username" page,
displaying a complete list of all other files in that dir. This also happens
if I create a new user and set his home directory to /var/www/html/username.
In this case both /~username and /username URLs will bring up a "List of /username"
or "List of /~username" page if index.html isn't found.

Can I make Apache display the "Forbidden" message for accesses to pages located
under /var/www/html/username also, if the index.html file is missing ?

P.S.: Directory permissions are all right, so that shouldn't have anything to do
with this.

Thank you very much for your answer.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message