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 ~ (http://any.domain.com/~username/). If his files are located
in /var/www/html/username, his web site will be reachable through the same
URL, but without the ~ (http://any.domain.com/username/).
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 http://any.domain.com/~username/. 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 http://any.domain.com/~username/
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.
Perplexer
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
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 ~ (http://any.domain.com/~username/). If his files are located
in /var/www/html/username, his web site will be reachable through the same
URL, but without the ~ (http://any.domain.com/username/).
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 http://any.domain.com/~username/. 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 http://any.domain.com/~username/
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.
Perplexer
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org