PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] How to enable directory listing in a virtual host of WAMP Server 3

 September 21, 2022     .htaccess, apache, php, virtualhost, wamp     No comments   

Issue

I am using wamp server 3 in my local machine. Whenever I make a virtual host I have to provide at least one index.php file to access my project directory, without it I am getting an 404 error.

But I also want to access my project directory without providing the index file. I like to see the directory lists when server doesn't find an index file. Like the below image:

enter image description here

I think the issue is in my httpd-vhost.conf file. Here is the virtual-host configuration of the directory that I want to enable directory listing:

<VirtualHost *:80>
    ServerName virtualhost.info
    DocumentRoot c:/wamp64/www/virtual_host_test
    <Directory  "c:/wamp64/www/virtual_host_test/">
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require local
    </Directory>
</VirtualHost>

Any help would be greatly appreciated.


Solution

Found one solution.

By default New Wamp disable the Fancy directory listings.

Edit the C:\wamp64\bin\apache\apache2.4.17\conf\httpd.conf

Need to load this module (remove the #)

LoadModule autoindex_module modules/mod_autoindex.so

Need to load this conf (remove the #)

Include conf/extra/httpd-autoindex.conf

Reference links: WAMP is not displaying the icons in the directory listing

Thanks



Answered By - Jimit Shah
Answer Checked By - Mildred Charles (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing