2

I did a search on stackoverflow/superuser, but couldn't quite find what I need. I used a script to setup my linux server. My www folder (/var/www/) is located on the root partition, and the capacity of this partition is limited. Can I move the www folder so I can run my website on a different partition? I would like www to be running from the /home/ folder, which is on the 1.9TB partition.

Any help would be great. Thank you.

4

You can move it:

mv /var/www /home/USERNAME/www

Then, create a symbolic link so you don't have to change any config:

ln -s /home/USERNAME/www /var/www
0

This question has been answered many times.
You need to change the DocumentRoot setting in your httpd.conf https://stackoverflow.com/questions/5891802/how-do-i-change-the-root-directory-of-an-apache-server

  • Is not same thing when you use another partition. I have done several times and tested, there's something more to do when documentRoot is in another partition. – Marcelo Ágil Nov 8 '18 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.