|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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?
|
|
#4
|
||||
|
||||
|
if main .conf allows that in overriding.
__________________
And you know I mean that. |
|
#5
|
|||
|
|||
|
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. |
|
#6
|
|||
|
|||
|
<Directory> directive is not allowed in .htaccess. Just put Options +Indexes in your .htaccess and that's it.
|
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > how not to show directory list |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|