Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2008 15:25:50 +0200 (CEST)
From:      Oliver Fromme <olli@lurza.secnetix.de>
To:        freebsd-chat@FreeBSD.ORG, a.j.werven@student.utwente.nl
Subject:   Re: [style] Where to put server dirs
Message-ID:  <200806051325.m55DPoGm040972@lurza.secnetix.de>
In-Reply-To: <48470120.8090404@student.utwente.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
Alphons "Fonz" van Werven wrote:
 > Just wondering: where would you put server directories, such as the httpd
 > root dir, the anonymous ftp root dir, the CVS repository, that stuff. Put
 > it in /usr/local (e.g. /usr/local/cvsroot or /usr/local/httpd), in /var
 > (e.g. /var/cvs or /var/www), in / (e.g. /cvs or /www), or somewhere else?
 > 
 > They will be seperate partitions, I'm just curious where people like to
 > mount them.

The answer is "it depends".  :-)

There is usually a default location.  For Apache, the
default document root under FreeBSD is /usr/local/www/data
or something like that.  For anonymous FTP it is the home
directory of the "ftp" user, i.e. /home/ftp.  Of course
those are just the defaults; you can change them whatever
you like.

I think /var is a bad idea.  The /var file system is for
data that changes often (i.e. it gets written to often),
such as log files, lock files, PID files, spool and queue
directories etc. (that's the reason why /var should always
be different from the root directory).  The write pattern
on server directories is usually different.

Some people put services alongside the user directories,
i.e. there is /home/www, /home/cvs and so on.  Another
possibility is to create a special top-level directory
such as /opt or /srv, and put the services there.

If it's a separate file system anyway, it doesn't really
matter that much how you call the mount point.

Best regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606,  Geschäftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün-
chen, HRB 125758,  Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart

FreeBSD-Dienstleistungen, -Produkte und mehr:  http://www.secnetix.de/bsd

"anyone new to programming should be kept as far from C++ as
possible;  actually showing the stuff should be considered a
criminal offence" -- Jacek Generowicz



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200806051325.m55DPoGm040972>