Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I have a server running Centos 5.6/PHP/MySQL etc that will only host one website all the time.

New question

Is there any security implication on leaving a single website hosted in the default location of /var/www/html/ versus the common location of /home/user/?

Original question

Does it make any sense* to have Apache webserver host the account in the home folder (/home/user) instead of the default location of /var/www/html?

*Sense mean performance benefit, security reasons, etc.

Thank you.

share|improve this question

migrated from stackoverflow.com May 21 '11 at 1:56

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Probably more secure to leave it over in /var/whatever. If you made it /home/user it could expose hidden files, who knows what else that might matter. If the two directories are on the same disk there shouldn't be any performance difference. [edit] Also, you might as well do it the way everyone else does it, just for consistency.

share|improve this answer
    
well I was also thinking that the apache user can not login in the machine meaning that in order for me to add files or edit them I will have to either login as root or create an new users and add it to the apache group or sudo group. –  redhatlab May 21 '11 at 0:59
    
Yeah, that is a pain. If you rephrased your question to how to best to handle running Apache as user apache and the best way to deal with one or more others users and permissions, I'd like to see what people had to say. –  Steve Kehlet May 21 '11 at 1:06
    
Hi Steve thank you for all your comments I am going to modify the question now. –  redhatlab May 21 '11 at 1:14

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.