My site is written in asp.net using mono and apache under ubuntu LTS.

After debugging most of the problems out I still had problems with my icon folder icons. It was giving me the wrong or no icon. Then I notice /blah gets me my custom 404 page while /icons gets me a directory listing.

Why is /icons/ path hitting a directory instead of using my asp.net code? No other path that I know of (ATM) does that.

Side note: /images/ also exist in the same directory as my icons folder. /images/ does not cause a directory listing either.

2 Answers 2


in your httpd.conf you have something like

Alias /icons /path/to/icon/dir
  • And... Directory ...Options Indexes
    – lg.
    Jun 21, 2010 at 12:54
  • 2
    it was in /etc/apache2/mods-enabled/alias.conf
    – user274
    Jun 21, 2010 at 14:32

Apache2 comes out of the box with an alias mod file enabled at this location:


and this is the content of that file

<IfModule alias_module>
        # Aliases: Add here as many aliases as you need (with no limit). The format is
        # Alias fakename realname
        # Note that if you include a trailing / on fakename then the server will
        # require it to be present in the URL.  So "/icons" isn't aliased in this
        # example, only "/icons/".  If the fakename is slash-terminated, then the
        # realname must also be slash terminated, and if the fakename omits the
        # trailing slash, the realname must also omit it.
        # We include the /icons/ alias for FancyIndexed directory listings.  If
        # you do not use FancyIndexing, you may comment this out.

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

        <Directory "/usr/share/apache2/icons">
                Options FollowSymlinks
                AllowOverride None
                Require all granted


So you can remove the sym link at


to disable the behavior.

  • 4
    f apache and my 7 year old question. I'm having a fantastic time with nginx
    – user274
    May 13, 2017 at 0:10
  • Yea, I prefer my newer NodeJS servers. But it doesn't make sense to move legacy apps from Apache to Nginx right now. Apache works. May 23 at 19:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy