Gentoo Archives: gentoo-server

From: Pedro Venda <pjvenda@×××××××.org>
To: gentoo-server@l.g.o
Cc: "Ryan James R." <rinkydinksrj@×××××.com>
Subject: Re: [gentoo-server] Apache2 Virtual Hosting
Date: Tue, 28 Feb 2006 18:07:54
Message-Id: 200602281800.49543.pjvenda@pjvenda.org
1 On Tuesday 28 February 2006 17:58, Pedro Venda wrote:
2 > On Tuesday 28 February 2006 16:14, Ryan James R. wrote:
3 > > I am trying to accomplish a mass virtual hosting server where each
4 > > website is run from it's own user account. Now I've accomplished
5 > > putting the websites into user's ~/public_html directories but Apache
6 > > is still running as it's own user so php file managers/admin backends
7 > > that are run from these sites.
8 > >
9 > > I took a look at mod_userdir but I'm not sure if that's what I was
10 > > wanting.
11 > >
12 > > From what I see, I think I need something that will allow apache to
13 > > spawn with userid of site it is serving. Please correct me if I'm
14 > > wrong and give as many suggestions as possible.
15 >
16 > there is more than one way to acomplish this, but none of them is perfect.
17 > generally you loose performance and may gain bonus security holes if you're
18 > not careful.
19 >
20 > * mod_suphp is the easiest and probably the best way to handle this. it
21 > allows selective php.ini configurations per vhost if you want and other
22 > nice restrictions. the online documentation is NOT up to date.
23
24 forgot to mention that mod_suphp is meant to be a php interpreter *only*.
25
26 >
27 > * mod_suexec is a more generic approach. However, when me and my team of
28 > sysadmins needed it, we found out that it didn't work exactly as we
29 > expected. we wanted it to serve .php files with the php cgi interpreter...
30 > if I remember correctly, mod_suexec needed the executable bit set on
31 > scripts and a .cgi extension, which would seriously break our installation.
32 > Miguel Filipe - a friend of mine - wrote a one-liner patch to make it work
33 > as we needed on a solaris apache2 installation we were administrating at
34 > the time (around 8000 users).. (http://mega.ist.utl.pt/~miguel/code/)
35 >
36 > Cheers,
37
38 --
39
40 Pedro João Lopes Venda
41 email: pjvenda at pjvenda org
42 http://www.pjvenda.org