LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-11-2003, 08:36 AM   #1
ScreeminChikin
Member
 
Registered: Aug 2002
Location: Kansas City
Distribution: Mandrake 9.2 and a couple of RH7.3 Apache servers
Posts: 153

Rep: Reputation: 30
Apache directory listing question


What directive do I have to set in Apache2 so that when a user tries to browse a folder that has just files and no index page, they get a "forbidden" message? Like if I have a folder of pictures say www.myserver.com/pictures, I dont want it to list the folder contents. I only want to allow accesss if the user knows the specific name of a file like www.myserver.com/pictures/mypicture.jpg . It seems that it was like this by default in apache 1.3 but on my Apache2 box it will generate a directory listing instead of the "forbidden" page.
 
Old 06-13-2003, 04:43 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If this is still an issue, check your directives for where it automagically generates dir indexes and turn that off.
 
Old 12-23-2003, 06:20 PM   #3
jini555
LQ Newbie
 
Registered: Dec 2003
Posts: 2

Rep: Reputation: 0
i would like the answer to this question as well. I need to know what options to set for the Directory directive.
 
Old 12-23-2003, 06:42 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by jini555
i would like the answer to this question as well. I need to know what options to set for the Directory directive.
In your httpd.conf file you will see something like:
Code:
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
    Options Indexes FollowSymLinks MultiView
To disable Indexing, just remove Indexes after the Options listed above.

Cheers.
 
Old 02-10-2004, 05:04 AM   #5
robertoneto123
Member
 
Registered: Sep 2003
Distribution: Red Hat, Conectiva Linux
Posts: 38

Rep: Reputation: 15
I tryied to follow your tip, but it does not work...

Is the code bellow wrong?

Code:
<Directory />
  Options -All Multiviews Indexes FollowSymLinks
  AllowOverride None
  <IfModule mod_access.c>
    Order deny,allow
    Deny from all
  </IfModule>
</Directory>
 
Old 04-14-2004, 06:17 AM   #6
totalnuke
LQ Newbie
 
Registered: Jan 2003
Location: New York City (I think you know this one)
Distribution: RH, ManDrake
Posts: 6

Rep: Reputation: 0
c'mon isn't there anyone with a working solution ?
I was trying to find an answer for a whole night, if anyone out there has this working on linux box (win ans linux conf files are different) please post.

here is original version of httpd2.conf:
Code:
# First, we configure the "default" to be a very restrictive set of 
# permissions.  
#
# Also, for security, we disable indexes globally
#
#<Directory />
#    Options -Indexes FollowSymLinks
#    AllowOverride None
#</Directory>

#Restricted set of options 
<Directory />
  Options +All -Multiviews
  AllowOverride None
  <IfModule mod_access.c>
    Order deny,allow
    Deny from all
  </IfModule>
</Directory>
 
Old 04-15-2004, 02:33 AM   #7
totalnuke
LQ Newbie
 
Registered: Jan 2003
Location: New York City (I think you know this one)
Distribution: RH, ManDrake
Posts: 6

Rep: Reputation: 0
well, i've got a solution myself, as it is pretty important thing for me. Just use Apache 1.3, at least I never had a problem with it.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Directory Listing Of NFS Mount, cannot view directory list via apache luqmana Linux - Networking 2 12-19-2005 06:03 AM
apache directory listing doralsoral Linux - Software 2 06-15-2005 07:37 AM
apache - directory listing thejackal13 Linux - Software 1 01-05-2005 10:31 AM
Directory Listing with apache aroop Linux - Networking 2 06-02-2004 02:50 AM
apache 2 directory listing jwatco2001 Linux - Software 5 06-07-2003 06:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration