Hello all. I am running an instance of apache2, though I've tried uhttpd and lighttpd and it's the same problem. What I actually want to do is a symlink in the /var/www folder, that points to a mounted USB drive. The USB drive can be accessed in 2 ways: either /dev/sda2 or /usb. it's the same thing! I want to make a folder called "usb" in /var/www that will point to /usb in order to access the files from the USB drive from the web without copying them in the HTTPd folder. Basically I want /var/www/usb/file.txt to point to /usb/file.txt (or /dev/sda2/file.txt) I've tried some ln -s examples from the web and adapted them to my folder structure but it just makes a regular empty folder...
/dev/sda2 and /usb is not the same thing. the device is usally mounted. I am assuming the device /dev/sda2 is mounted on /usb. Apache by default does not follow symlinks. You need to add Option FollowSymlinks in your web host config or the virtual host config. Also the permission of linked file and symlink should allow the apache2 user read access.