Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have defined a single vhost configuration (see below) for a domain. All HTML files in the root get served properly. But I can't access any files within a particular sub-directory called 'icons'. or work fine but gives a 'File not found error' despite the file actually being there.

Moreover, when I try to access , instead of getting an error, a file listing of the apache icon directory is displayed! should serve from /var/www/ and should serve from /var/www/ but instead a directory listing of /var/www/icons is shown. works and serves correctly from /var/www/

Another funny this is, directory listing is disabled but a listing of the icon directory is still displayed for

DocumentRoot "/var/www/html"

# First, we configure the "default" to be a very restrictive set of
# features.
<Directory />
    Order deny,allow
    Deny from all
    Options None
    AllowOverride None

<VirtualHost *:80>

     DocumentRoot /var/www/

     <Directory /var/www/>
     Order allow,deny
     Allow from all

     WSGIDaemonProcess app display-name=%{GROUP}  processes=2 threads=5 maximum-requests=5
     WSGIProcessGroup app

     WSGIScriptAlias /app /var/www/app/app.wsgi

     <Directory /var/www/app>
     Order allow,deny
     Allow from all

     ErrorLog /var/www/
     CustomLog /var/www/ combined
share|improve this question
up vote 3 down vote accepted


search in your apache config directory for /icons. you'll probably find in one of the files something like:

Alias /icons/ "/usr/share/apache2/icons/"

in debian/ubuntu world this is set in /etc/apache2/mods-enabled/alias.conf

files served from that directory are used for icons in directories listings generated by apache. just comment out this line and restart the server.

share|improve this answer
Thanks, don't know how I missed that. :) – Sam Nov 22 '09 at 12:01
For all XAMPP users: I've found an icons alias line in apache/conf/extra/httpd-autoindex.conf. If you don't find it, it'll be the best to search in the whole conf directory (e.g. using Notepad++). – ComFreek May 22 '13 at 11:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.