Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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'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.

share|improve this question

migrated from Mar 29 '11 at 13:18

This question came from our site for professional and enthusiast programmers.

Use <LocationMatch > or a RewriteRule. With those you can achieve it easily. – 0xC0000022L Mar 29 '11 at 0:22

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").

share|improve this answer

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.

share|improve this answer

Your Answer


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