Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

meaning:

   /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
</Directory> 

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

I will appreciate any advice.

share|improve this question

migrated from stackoverflow.com 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

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

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

 
discard

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