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

Re: installing apache into alternate directory?



Steve and Roberto,

Thanks!

I guess I'll have to do this manually - not a big deal.

I have two servers that need to run with very different configurations, so I've always found it easier to run completely different directories.

Miles

Roberto C. Sanchez wrote:
On Sat, Aug 05, 2006 at 04:06:16PM -0400, Miles Fidelman wrote:
I can't seem to find an answer in any of the normal places, so...

Short of making from scratch, is there a way to get apt-get to install a copy of apache in an alternate directory, so I can run several demons in parallel?

I often run Apache by setting up a /home/foo/apache2 and
/home/foo/public_html, where public_html contains the content and
apache2 contains the following directories: bin, conf, init.d, lock,
log, run.  The bin directory contains a copy of apache2ctl modified to
start/stop apache using the different directory layout.  The conf
directory is essentially a copy of /etc/apache2 customized for that
particular apache instance.  The init.d directory contians a copy of the
/etc/init.d/apache2 script which has been modified for the new directory
layout.  The log, run and lock directories contain the various files
created at runtime by apache.  What I then do is create a cron job
@reboot that will start that user's apache instance.  In order that
everything might work smoothly so that users don't need to use some high
numbered port, I set the individual apache instance to use a high number
port and then use ProxyPass and ProxyPassReverse in the main apache
instance.  This allows me to something like have one user with mod_php
enabled (notriously insecure, but performs well) and another with
mod_perl and another with mod_python.  The advantage to this approach is
that with everything in a separate memory space, the chance that someone
rogue user will get to another user's content is minimzed to a degree.
The disadvantage to this approach is that with everything in a seperate
memory space, you use more memory.

Regards,

-Roberto




Reply to: