0

I have a dedicated server that I need to setup one website one. Where should it be located?

I thought it should be:

/root/public_html

But I think that folder falls in the '/' partition and it only has a capacity of 7.6GB (which is now full).

3 Answers 3

2

Don't put it into /root, which is the home directory of user root, so it is meant for data files and configuration files you work with when running an interactive session as user root. As a rule, you never do that, so little should be found in there. Your website certainly doesn't consist of private files used by that user, so it doesn't belong there.

Common practice is to put data files for everyone's use in /var (I've never seen a /srv). Websites often live in /var/www, /var/httpd or similar.

However, /var is traditionally reserved for variable files that are local to a single host. If the files of your website are served by one host to another, something else (/srv?) is more appropriate.

2
  • Works! Thanks - had some temp folder structure there already...
    – siliconpi
    Oct 13, 2010 at 8:44
  • I have added one paragraph to make it clear that the answer suggesting /srv isn't wrong in any way. Oct 25, 2010 at 21:21
0

If you haven't decided yet, it could be the good timing to think about using a dedicated partition (RAID) and/or to add quota to it (you never know if you will allow users to upload files, and you don't want to let your /var partition fill up).

-1

/srv/www/htdocs is traditional these days.

4
  • "traditional these days". Isn't that an oxymoron? :) Jan 24, 2011 at 23:31
  • 1
    @JohnGardeniers You'd be surprised the number of things I run into that have always been done that way for a month or two.
    – sysadmin1138
    Jan 24, 2011 at 23:33
  • I've never seen a machine with htdocs at that path.
    – devicenull
    Jan 25, 2011 at 0:32
  • @devicenull Clearly you've never worked on SUSE servers.
    – sysadmin1138
    Jan 25, 2011 at 1:10

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.