Enable directory/file listing in XAMPP

后端 未结 5 1064
谎友^
谎友^ 2021-01-14 01:19

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

相关标签:
5条回答
  • 2021-01-14 01:25

    Open apache/conf/httpd.conf and search for Indexes in httpd.conf And comment complete line like this:

    #Options Indexes FollowSymLinks Includes ExecCGI
    #Options  - Indexes FollowSymLinks Includes ExecCGI
    

    Uncommenting First will enable the indexing of directories. Uncommenting Second will disable indexing of directories Removing the comment will enable the Directory/file listing of hosted path.

    0 讨论(0)
  • 2021-01-14 01:26

    Rename the 'index.php' file that sits in your htdocs folder to something like 'MODIFIED_index.php' (if you want to be able to revert to it later) - this index.php file is only used to point to xampp's admin controls that are found in 'localhost/xampp/' anyway.

    0 讨论(0)
  • 2021-01-14 01:41

    There is a XAMPP Directory Browsing UI app, that will help you to browse projects inside htdocs in XAMPP.

    0 讨论(0)
  • 2021-01-14 01:44

    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.

    0 讨论(0)
  • 2021-01-14 01:50

    Just delete or rename index.html and index.php files

    0 讨论(0)
提交回复
热议问题