Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

I thought it should be:


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

share|improve this question
up vote 2 down vote accepted

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.

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

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).

share|improve this answer

/srv/www/htdocs is traditional these days.

share|improve this answer
"traditional these days". Isn't that an oxymoron? :) – John Gardeniers Jan 24 '11 at 23:31
@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 '11 at 23:33
I've never seen a machine with htdocs at that path. – devicenull Jan 25 '11 at 0:32
@devicenull Clearly you've never worked on SUSE servers. – sysadmin1138 Jan 25 '11 at 1:10

Your Answer


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.