Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 12th, 2001, 11:42 AM
cindy_lens cindy_lens is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 28 cindy_lens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how not to show directory list

Hi

How can I set up apache to disallow the showing of directory listing. For example, when I access a folder that does not have an index.html file, all the files and folders in that directory show up on the browser.

Thank you
Cindy

Reply With Quote
  #2  
Old October 12th, 2001, 06:08 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
If you have access to httpd.conf, within all <Directory> blocks, add Options -Indexes in it or just don't put Indexes anywhere, so directory listing is disabled globally.
Conversely, if you have certain directories you want to enable Indexes, just put:
<Directory "/path/to/dir/you/want/to/be/indexes">
Optioins +Indexes # or Indexes
...
</Directory>
For performance wise, it's better not to do it in .htaccess.

Start here -> http://httpd.apache.org/docs/mod/core.html#options

Reply With Quote
  #3  
Old November 23rd, 2001, 10:59 AM
bottomer bottomer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 2 bottomer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question options indexes in .htaccess

Is it possible to enable directory listings in a specific directory through an htaccess directive when they have been denied at the httpd.conf level?

Reply With Quote
  #4  
Old November 23rd, 2001, 11:01 AM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level)AlCapone User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 18
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
if main .conf allows that in overriding.
__________________
And you know I mean that.

Reply With Quote
  #5  
Old November 23rd, 2001, 11:13 AM
bottomer bottomer is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 2 bottomer User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question options indexes in .htaccess

Is there anyway to know whether it is allowed in main.conf
other than trying the option and failing?

I assume if I am allowed to override, the syntax in .htacess
would be:
<Directory full-path-goes-here>
Options Indexes
</Directory>

Since this isn't working, I'm wondering how I can find out why.

Reply With Quote
  #6  
Old November 23rd, 2001, 06:02 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
<Directory> directive is not allowed in .htaccess. Just put Options +Indexes in your .htaccess and that's it.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > how not to show directory list


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT