Multiple instances of Apache

Roger McCalman roger at runcircle.co.uk
Thu Nov 11 22:02:58 GMT 2004


On Thu, Nov 11, 2004 at 09:41:16PM +0000, Lee Brotherston wrote:
> David Jenkins wrote:
> >I would like to have 2 instances of Apache installed on the same
> >machine. My reasons for doing this are so that I can test PHP4 and
> >PHP5.
> 
> Rather than trying to worry about maintaining two copies of apache... 
> It might be easier to just install apache once and have two different 
> configs, one which loads the php4 mod and one which loads php5?  That 
> way you don't have to worry about package management for apache or php, 
> only fiddling the startup scripts to start both copies with different 
> configs.

You can run multiple apache's with/withour chroot/jail. If you want them to
be on port 80 then just create an alias on one or more intefaces and adjust
the httpd.conf Listen lines(s) to listen on one IP address i.e.

ifconfig xl0 inet 192.168.80.80 netmask 0xffffffff alias
ifconfig xl0 inet 192.168.80.81 netmask 0xffffffff alias

in httpd-php.conf
Listen 192.168.80.80:80
LoadModule php5 ...
in httpd.conf
Listen 192.168.80.81:80
...

Cheers, Roger

> 
> Just a thought
> 
>   Lee
> 
> ------ FreeBSD UK Users' Group  -  Mailing List ------
> http://listserver.uk.freebsd.org/mailman/listinfo/freebsd-users




More information about the Ukfreebsd mailing list