Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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 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:


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

[error] [client] File does not exist: /var/www/home, referer: 

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

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


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.