1

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?

sadmicrowave
  • 143
  • 1
  • 9
  • Wait; so you're webpage has ``? URLs and File System Paths are completely different. Or maybe I'm misunderstanding? – Chris S Jun 29 '11 at 18:55
  • @Chris S - thats pretty much right. These images are the only thing stored on this mount so when I wan to point to one of them I need a path like this one. The other images and urls use relative paths. – sadmicrowave Jun 29 '11 at 19:00
  • the other option is make this a relative link by adding 4 sets of `../` to the beginning of the path....but I don't really want to do that – sadmicrowave Jun 29 '11 at 19:03
  • You'll have to add an alias or something in Apache's configuration. Something like the url `/images` points to the FS path `/home/lv_admin/rest_of_path`. Then the `` tags would have `src="/images/pictures.jpg"`. Adding `../` doesn't work; for somewhat obvious security reasons. – Chris S Jun 29 '11 at 19:03
  • what if I mounted the uslonsnas001 drive in /var/www/ ? then I COULD make it a relative link – sadmicrowave Jun 29 '11 at 19:13
  • Yep; that would work too. – Chris S Jun 29 '11 at 19:16

0 Answers0