[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Where does /cgi-bin/ belong?



On Tue, 2002-07-02 at 07:42, Gary Turner wrote:
> On Mon, 01 Jul 2002 22:18:55 -0500, Derrick 'dman' Hudson wrote:
> >On Mon, Jul 01, 2002 at 09:43:06PM -0500, Gary Turner wrote:

[cgi-bin in /var/www/cgi-bin?]

> The more I think about it, the more I disagree.  The /var hierarchy
> seems to be for variable data.  Logs, databases, and intermediate data
> belong because the files are variable as are your examples.  HTML and
> its brethren are static in the same sense as config files are.  They may
> be modified, but it's not automatic.  A person does it, not the machine.

/var/www is ok for the html, as the purpose of the separation between
/var and /usr is (as far as I understand it) to allow /usr to be mounted
read only. html is static, but I think modified frequently enough that
you don't want to have to remount /usr every time.

cgi scripts? I'm not sure myself. /usr/lib is the right place for
pre-packaged stuff, so /usr/local/cgi-bin would be ok for self-added
stuff. 

Personally (for ease of backup, mainly) I've always created a 'web' user
and put everything in /home/web/htdocs and /home/web/cgi-bin. This makes
sense if you have multiple domains on your webserver, too - just create
an user per virtual host, and you have it beatifully separated (and with
suexec and the virtual host configured to use that user, most permission
problems are solved. Not sure about php and mod_perl etc., they
sometimes run as main-apache user instead of the 'virtual host user'.)

cheers
-- vbi

-- 
secure email with gpg                         http://fortytwo.ch/gpg

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: