Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a network drive mounted at /home/lv_admin/uslonsnas001 where I have stored images. The mount point and all sub folders have rwx mod 775 privileges. My PHP script moves the images to this mount but Apache cannot view the images afterwards. My webpage (located in /var/www/) has the image path set to:

/home/lv_admin/uslonsnas001/BoardTest/2011/5/29/10/35/17788/Images/E_1-U23.jpg

The /var/log/apache2/error.log shows an error of:

[error] [client 128.251.109.244] File does not exist: /var/www/home, referer: 
http://uslonsweb003.us.alcatel-lucent.com/AOI/repairtool/repairindex.php

so, it looks like Apache is trying to treat my image path as a relative link but I think it should be a symbolic link. What can I do to fix this?

share|improve this question

migrated from stackoverflow.com Jun 30 '11 at 10:17

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

    
From the log, it looks as though it's complaining that /var/www/home doesn't exist. Does it? –  Andy Smith Jun 30 '11 at 11:52
    
It would help if we could see this repairindex.php code, but then again we could say: move it back to stackoverflow.com :) Anyhow - needs more information cuz there could be at least 4 directions where to look at.. –  elv Feb 16 '12 at 12:43

1 Answer 1

Apache consider urls are either relative or absolute w.r.t. the site folder, not the root of the system.

You can work around this using symlinks, and activating the FollowSymlinks option. Refer to apache's documentation.

share|improve this answer

Your Answer

 
discard

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.