Mailing List Archive

Apache "Forbidden"
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
Re: Apache "Forbidden" [ In reply to ]
You can do so using a

Options -Indexes

directive for that directory

Daniel

On Mon, Jan 28, 2002 at 08:55:00PM +0100, Perplexer wrote:
> 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
>

---------------------------------------------------------------------
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
Re: Apache "Forbidden" [ In reply to ]
Can you perhaps explain what I must do more in detail.
I'm not experienced enough to really understand what
you suggested I do. I would appreciate it if you could
be more specific.

Thanks.

-----------
Perplexer

----- Original Message -----
From: "Daniel Lopez" <daniel@rawbyte.com>
To: <users@httpd.apache.org>
Sent: Monday, January 28, 2002 9:48 PM
Subject: Re: Apache "Forbidden"


>
> You can do so using a
>
> Options -Indexes
>
> directive for that directory
>
> Daniel
>
> On Mon, Jan 28, 2002 at 08:55:00PM +0100, Perplexer wrote:
> > 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
> >
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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
Re: Apache "Forbidden" [ In reply to ]
If you want to disable directory listings globaly,
look in your configuration file for instances of the
Options directive, and make sure they contain
the -Indexes argument.
If you want to enable or disable only in particular directories,
you can place the dollowing directive:
Options -Indexes
in the apropriate <directory> section

That should work, let us know

Daniel



> Can you perhaps explain what I must do more in detail.
> I'm not experienced enough to really understand what
> you suggested I do. I would appreciate it if you could
> be more specific.
>
> Thanks.
>
> -----------
> Perplexer
>
> ----- Original Message -----
> From: "Daniel Lopez" <daniel@rawbyte.com>
> To: <users@httpd.apache.org>
> Sent: Monday, January 28, 2002 9:48 PM
> Subject: Re: Apache "Forbidden"
>
>
> >
> > You can do so using a
> >
> > Options -Indexes
> >
> > directive for that directory
> >
> > Daniel
> >
> > On Mon, Jan 28, 2002 at 08:55:00PM +0100, Perplexer wrote:
> > > 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
> > >
> >
> > ---------------------------------------------------------------------
> > 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
> >
>
>
> ---------------------------------------------------------------------
> 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
>

---------------------------------------------------------------------
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
Re: Apache "Forbidden" [ In reply to ]
Okay, I seem to have done it.
Thanks again !

-----------
Perplexer

----- Original Message -----
From: "Daniel Lopez" <daniel@rawbyte.com>
To: <users@httpd.apache.org>
Sent: Monday, January 28, 2002 10:30 PM
Subject: Re: Apache "Forbidden"


>
> If you want to disable directory listings globaly,
> look in your configuration file for instances of the
> Options directive, and make sure they contain
> the -Indexes argument.
> If you want to enable or disable only in particular directories,
> you can place the dollowing directive:
> Options -Indexes
> in the apropriate <directory> section
>
> That should work, let us know
>
> Daniel
>
>
>
> > Can you perhaps explain what I must do more in detail.
> > I'm not experienced enough to really understand what
> > you suggested I do. I would appreciate it if you could
> > be more specific.
> >
> > Thanks.
> >
> > -----------
> > Perplexer
> >
> > ----- Original Message -----
> > From: "Daniel Lopez" <daniel@rawbyte.com>
> > To: <users@httpd.apache.org>
> > Sent: Monday, January 28, 2002 9:48 PM
> > Subject: Re: Apache "Forbidden"
> >
> >
> > >
> > > You can do so using a
> > >
> > > Options -Indexes
> > >
> > > directive for that directory
> > >
> > > Daniel
> > >
> > > On Mon, Jan 28, 2002 at 08:55:00PM +0100, Perplexer wrote:
> > > > 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
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > 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
> > >
> >
> >
> > ---------------------------------------------------------------------
> > 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
> >
>
> ---------------------------------------------------------------------
> 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
>


---------------------------------------------------------------------
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