Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 1998 08:30:02 +1100 (EST)
From:      Jim Mock <jim@corp.au.triax.com>
To:        Marc Andre Paquin <map@interresa.ca>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Multi-user web file structure on FreeBSD
Message-ID:  <Pine.BSF.4.05.9812300818540.242-100000@corp.au.triax.com>
In-Reply-To: <368A6DC1.1A281F50@interresa.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 30 Dec 1998, Marc Andre Paquin wrote:

[snip..]
> In the book, I see that the default set up is:
> /usr/local/www/data/
>

An easy way to set it up is to use /usr/local/www/data for the apache
root (as it is by default), and put all of the web pages for your site
there.  

> With my new installation (version 2.2.7), I plan to have more than
> a hundred clients with their own web pages. They will be able to
> update some pages by FTP so security is a big concern. What is the
> ideal tree?
>

The way I've got it set up is like this..

For example, if user bob wants www.bob.com, the section in httpd.conf
for www.bob.com will look like this..

<VirtualHost www.bob.com>
ServerAdmin bob@bob.com
DocumentRoot /usr/home/bob/public_html-www.bob.com
ServerName www.bob.com
ErrorLog /usr/weblogs/www.bob.com-error_log
TransferLog /usr/weblogs/www.bob.com-access_log
ScriptAlias /cgi-bin/ /usr/home/bob/public_html-www.bob.com/cgi-bin/
</VirtualHost>

Notice the DocumentRoot.  That puts all of bob's web pages in
public_html-www.bob.com in his home directory.  If bob wanted to add a
second domain, I'd set up another vhost in httpd.conf and point it to
public_html-www.bob2.com in his home directory, etc.  I also have the
log files for bob from /usr/weblogs symlinked to a logs directory in
his home directory so he can access them.

Each user logs in via ftp with their own username and password and has
access to only their home directory.

Hope this helps,

-- 
: Jim Mock			| [jim@corp.au.triax.com]	:
: System Administrator		| http://www.triax.com/		:
: Triax Internet Services	| ----------------------------- :
: Portland, OR USA		| FreeBSD: The Power to Serve	:
: Wagga Wagga, NSW Australia	| http://www.freebsd.org/	:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.05.9812300818540.242-100000>