Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it safe to change the appache default website root folder to somewhere in user home? I wonder if it is okay to do. Because otherwise I have to save the default site by another name and then run apache commands to disable the default site and enable mine. So why not just edit the default site and change the document root and directory to somewhere in my home.

share|improve this question
add comment

2 Answers

it is safe, it's all about permissions, i put my document root within my home directory and execute `sudo chown -R www-data:www-data ~/jhano/public_html

share|improve this answer
add comment

First it is OK and safe to point the document root to some directory within your home directory.
Saying that, please notice that there is no difference over changing the owner of the current document root to be you. You can easily do so by execution chown -R <user> <webdir> where user is your username and webdir is current apache documents root where you place your site files.

share|improve this answer
add comment

Your Answer

 
discard

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.