Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apache webroot icons not loading

Tags:

php

icons

apache

I know this is a silly question, but I would like to know why it is happening so.

I am using wamp server version 2.1. While viewing directories in localhost, the images beside the files are not getting loaded. Refer image below. On inspect of the image, I see it fails to load /icons/folder.gif, where can I find those images and how to load them?

enter image description here

like image 532
Anji Avatar asked Jan 19 '23 20:01

Anji


2 Answers

Step 1, Edit "httpd-autoindex.conf" file like;

Alias /icons/ "C:/wamp/bin/apache/apache2.4.2/icons/"

<Directory "C:/wamp/bin/apache/apache2.4.2/icons">
    Options Indexes MultiViews
    AllowOverride None
    Require all granted
</Directory>

Step 2, remove first "#" characters from "httpd.conf" file in

Include conf/extra/httpd-autoindex.conf

and

LoadModule autoindex_module modules/mod_autoindex.so

lines

Step 3, restart all services from wamp try icon

like image 112
Muhammed Avatar answered Jan 22 '23 11:01

Muhammed


it is pointing to wrong dir in

C:\wamp\bin\apache\YOUR_VERSION\conf\extra\httpd-autoindex.conf

Alias /icons/ "/httpd-2.2-x64/icons/"

<Directory "/httpd-2.2-x64/icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

should be

Alias /icons/ "icons/"

<Directory "icons">
    Options Indexes MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

restart server

like image 43
Benn Avatar answered Jan 22 '23 11:01

Benn