Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable directory/file listing in XAMPP

Tags:

xampp

How to enable directory and file listing in XAMPP ? In WAMP it is by default enabled.

like image 506
Sourav Avatar asked Jan 15 '12 14:01

Sourav


People also ask

How do I stop a directory listing in XAMPP?

Re: Disable directory listing You just need to look for the file httpd. conf and edit this file. Search for Indexes in this file and set it to -Indexes. Restart Apache and then directory listing is switched off for all your folders.


1 Answers

My Xampp httpd.conf already had the Indexes option under the xampp directory entry Removing all the default #comment lines, it looks like this:

<Directory "C:/xampp/htdocs">
    Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

But, I have my local root mapped to a different directory, outside of 'htdocs', (as per this post Make XAMPP/Apache serve file outside of htdocs ) so to enable this for all directories, I had to find the entry just above that, and add the word "Indexes" to it.

<Directory />
    Options FollowSymLinks Indexes
    AllowOverride None
    Order deny,allow
    Deny from all
</Directory>

Note I would never enable this for all directories on a production server, but locally it is quite useful.

like image 150
m_evangelista Avatar answered Sep 30 '22 14:09

m_evangelista