Server Fault is a question and answer site for system and network administrators. 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 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 (two mirrored 74 GB 15k SCSI drive).

I have another drive with much more capacity (300 GB), 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, would it still work if I symlinked to the second drive? (Basically, would Apache/PHP automatically know to follow the symlink for that directory?).

I'm beginning to run out of space on the main drive, and I can't get the budget to upgrade. I'm running CentOS 5.3, Apache 2.2.x, PHP 5.2.13.

share|improve this question
up vote 2 down vote accepted

If you have Options FollowSymLinks set globally, or for that virtual host, or for the parent directory, then yes, Apache will know to follow the symlink.

share|improve this answer
Do you know if that's enabled by default? I will check httpd.conf, just to be sure... – geerlingguy Apr 26 '10 at 19:01
This is probably distro specific, and I don't have access to a CentOS box right now, but on Red Hat Enterprise 5.5 (on which CentOS is based) it is enabled by default. – Prof. Moriarty Apr 26 '10 at 19:05

Another possibility is using alias in Apache. For example:

alias /files /backups/files
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.