You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Ben Mihailescu <be...@ece.mcgill.ca> on 2002/11/13 20:57:30 UTC

[users@httpd] Option Indexes question

Hi all,

Apache 1.3.26 on Solaris 8.

Things work well, but I am wondering if there is a way to allow 
directory indexes from the directory *bellow* the users www directory.

The purpose of this would be that if by accident or maliciously someone 
would browse to http://domain.com/~username and that user does not have 
an index.htm/html file in his public_html directory, the surfer would 
not see a list of files in the public_html directory.


I would like to do this in order to protect dufus users that store files 
in their public_html without thinking of the consequences.

Thanks,Ben

snippet of httpd.conf

---------------------------

# Each directory to which Apache has access, can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
     Options FollowSymLinks Indexes
     AllowOverride All
</Directory>

-------------------------
Tx, Ben


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Option Indexes question

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 13 Nov 2002, Ben Mihailescu wrote:
> Disable it for the public_html dir, but allow it for the dirs bellow
> public_html, i.e. pictures, music, etc.

<Directory /home/*/public_html>
Options -Indexes
</Directory>

<Directory /home/*/public_html/*>
Options +Indexes
</Directory>

Joshua.


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Option Indexes question

Posted by Ben Mihailescu <be...@ece.mcgill.ca>.

Joshua Slive wrote:

>On Wed, 13 Nov 2002, Ben Mihailescu wrote:
>
>>Things work well, but I am wondering if there is a way to allow
>>directory indexes from the directory *bellow* the users www directory.
>>
>
>That's not an incredibly clear question.  Do you want to DISABLE directory
>listings for user directories?  If so, a simple
>
><Directory /home>
>Options -Indexes
></Directory>
>
>should do the trick.
>
>If you want something else, please try to rephrase a little clearer
>exactly what effect you are looking for.
>
>Joshua.
>
Disable it for the public_html dir, but allow it for the dirs bellow 
public_html, i.e. pictures, music, etc.

Ben


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Option Indexes question

Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 13 Nov 2002, Ben Mihailescu wrote:
> Things work well, but I am wondering if there is a way to allow
> directory indexes from the directory *bellow* the users www directory.

That's not an incredibly clear question.  Do you want to DISABLE directory
listings for user directories?  If so, a simple

<Directory /home>
Options -Indexes
</Directory>

should do the trick.

If you want something else, please try to rephrase a little clearer
exactly what effect you are looking for.

Joshua.


---------------------------------------------------------------------
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
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org