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).
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).
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.
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).
/srv/www/htdocs is traditional these days.