0

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.

1 Answer 1

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.

3
  • 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
    Commented May 21, 2011 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
    Commented May 21, 2011 at 1:06
  • Hi Steve thank you for all your comments I am going to modify the question now.
    – redhatlab
    Commented May 21, 2011 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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