I'm receiving from the client a request for a ".png" file. The request is by sending the full address (I cant change that).


   /var/www/imges/<file name> 

The problem from what I understand is that the apache server understands this:

 /var/www/imges/var/www/imges/<file name>

Because his root is at "/var/www/"/ So he can't find it.

I try to add the the ".conf" file an Alias Directive:

Alias /var/www/imges /images
<Directory /image>
   Order allow,deny
   Allow from all

But it doesn’t seem to do anything...

I will appreciate any advice.

  • Use <LocationMatch > or a RewriteRule. With those you can achieve it easily. Mar 29, 2011 at 0:22

2 Answers 2


Just try something like:

 Alias /var/www/imges /var/www/imges

restart Apache and try loading an image like http://site/var/www/imges/image.jpg. If you get an error message the type of error will help you determine what is wrong. Also make sure your path name is spelled correctly (is it "imges" or "images").


It's the opposite way around:

Alias /images /path/to/images

All images under /path/to/images are then available since http://host/images/image.png.

You must log in to answer this question.