Symlink across local volumes in webroot?

Posted by geerlingguy on Server Fault See other posts from Server Fault or by geerlingguy
Published on 2010-04-26T18:43:09Z Indexed on 2010/04/26 18:43 UTC
Read the original article Hit count: 245

Filed under:
|
|

I am looking for a good short-term solution to storage space concerns on my website. Currently, I have all uploaded files (flash video, images, etc.) inside the 'files' directory in my web root (/home/account/public_html/files).

That directory is located on my high-speed main hard drive (a 15k SCSI drive).

I have another drive with much more capacity, but spinning at 10k rpm (so still fast, but not as good for random reads/writes as the main drive. The entire drive is mounted at /backup

Right now I'm just using it as a backup volume. I would like to create a symlink from my /home/account/public_html/files folder to /backup/files, and have all files reside on the second drive.

However, if someone accesses a file at http://www.example.com/files/filename.jpg, would it still work if I symlinked to the second drive? (Basically, would Apache/PHP automatically know to follow the symlink for that directory?).

© Server Fault or respective owner

Related posts about linux

Related posts about apache