[nycbug-talk] Multiple Apache Instances?

Paul Dlug paul
Tue Jul 26 01:16:54 EDT 2005


On Jul 25, 2005, at 2:30 PM, Jonathan Vanasco wrote:

> Has anyone here configured multiple apache instances in freebsd  
> using ports?
>
> I can do it from source on linux machine building 2 different trees  
> from source, like so:
>     /usr/local/apache2-plain
>     /usr/local/apache2-modperl
>
> but i was hoping on trying to stay in the ports system and using  
> the same binaries with different configuration files called at startup
>
> anyone have a pointer?

I do this for almost all our webservers but I don't do multiple  
ports, I install using the standard port and then just setup  
alternate skeleton directories with conf files and startup scripts.

For example:

/usr/apache/modperl
/usr/apache/static

Then each directory has a conf directory with config files that  
reference the ports modules /usr/local/libexec/apache, etc. and a bin  
directory with an apachectl modified for the new path, just modify  
the HTTPD variable:

HTTPD="/usr/local/sbin/httpd -DSSL -d /usr/apache/static -f /usr/ 
apache/static/conf/httpd.conf"

I've been using this approach for over 3 years with lots of success,  
very flexible for dev and staging environments as well. As long as  
you're using dynamic modules it works, I did an evaluation a while  
ago and determined that we weren't gaining much by building modules  
in statically.


--Paul




More information about the talk mailing list