WAMP is not displaying the icons in the directory listing

梦想的初衷 提交于 2019-12-04 16:56:49

This has to do with the Apache indexer config file. Its a bug with the Wamp installer. It does not modify the httpd-autoindex.conf configuration file to point to the Wamp directory you specified.

Look in httpd-autoindex.conf and change the paths to point to where the icons are located. On my WampServer, they are located in c:/wamp/bin/apache/apache2.4.9/icons.

Here's the relevant area of httpd-autoindex.conf you need to change:

#Comment out and change below to appropriate icon path
#Alias /icons/ "c:/Apache24/icons/"
Alias /icons/ "c:/wamp/bin/apache/apache2.4.9/icons/"

#Comment out and change below to appropriate icon path
#Directory "c:/Apache24/icons">
<Directory "c:/wamp/bin/apache/apache2.4.9/icons/">
    Options Indexes MultiViews
    AllowOverride None
    Require all granted
</Directory>

By default, WampServer should already have enabled the fancy directory listing in httpd.conf. If they are commented out, enable them:

LoadModule autoindex_module modules/mod_autoindex.so

Include conf/extra/httpd-autoindex.conf

Don't forget to reboot Apache after making these changes.

I see you are running Apache.
Make sure your config file has an alias to icons as such:

Alias /icons/ "/usr/local/apache/icons/"

I had a directory icons/ in my root directory, and could not load anything from icons/. It shows the server icons in place of anything was there.

In C:/xampp/apache/conf/extra directory, there is httpd-autoindex.conf, this has an Alias.

Alias /icons/ "C:/xampp/apache/icons/"

...and this is the problem.

I had to change it to something else

Alias /iconsZ/ "C:/xampp/apache/icons/"

and I changed all the references from the same file (httpd-autoindex.conf) to reflect the new Alias iconsZ/

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!