chroot'd apache? (for copy-on-write ?)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Surely this had to have been asked and thought of a million
times, but I'm not quite sure what keywords to search on.

Say you have a complex web site with libraries and programs
all over the place, php needing this and that library, mod_perl
needing certain libraries and as it happens, they're incompatible.

In a high-scale production, one would just gradually swap out the
servers, upgrade, test, then bring them online in a nice orderly

What about smaller folks? (a VPS isn't an option here, already on one!)

What I'd like to do is run apache, mod_perl, php, and all those programs,
libraries in a chrooted environment, or some other mechanism with
a good, FAST "rollback" type of method, (but not quite the same,
I still need to old stuff to investigate anything that went wrong)

Then, when it's time to do a major upgrade, use another chrooted
environment for the new web server, mod_perl, php and any modified

Get it going on port 4008 (or something)

Swap to port 80.

Take down live one and bring up new upgraded one.

Something went wrong! NP. just swap back again.

Ok, so far, so good.


Thats a lot of files! I'd run out of storage space real quickly (especially
considering you need a compiler, perl5 and all those tools to install
the new stuff)

What I really need is a chroot or user-level filesystem with a "copy on write"

Any idea where one would find info on this kind of setup?

-- Custom web programming
guhzo_42@lnubb.pbz (rot13)                User Management Solutions

Re: chroot'd apache? (for copy-on-write ?) wrote:

Quoted text here. Click to load it

Which libraries?

Brian Wakem

Re: chroot'd apache? (for copy-on-write ?)

Quoted text here. Click to load it

Thats the problem.. could be dozens of them. Ones I know of are
basically the entire Apache2::** stuff, mod_perl, mod_php which
in turn uses libxslt, libxml, libz, lib-who-knows-what..

Then the swish libraries and the perl interfaces to those swish

Apache itself.

Custom stuff.

Way too many to really keep track of without making a month's project
out of it. I tried the old ./configure --prefix=/area/site002 and it
mostly works, but you end up with mysterious segfaults as one library
links to another older one.

If space weren't a problem, one could set up a mini-mini linux distro designed
to run in chroot.  One could, I suppose, create dozens of hard links to
the various files in the outer filesystem. (compilers, etc..) yuck.

Renaming dozens files isn't really much of an option. This is what I ended up
doing and found myself in a postition where, if anything had gone wrong
with the main server during the upgrade phase, I would not have been
able to restart it because stuff it needed wasn't there anymore.

Compiling the stuff out-of-server would work, but, you end up with porting
problems as one machine is slightly different. (and anyway, I like my
stuff compiled for the target machine)

-- Custom web programming
guhzo_42@lnubb.pbz (rot13)                User Management Solutions

Site Timeline