Carp and Apache

DAve dave.list at pixelhammer.com
Mon Oct 24 14:32:55 PDT 2005


Good afternoon,

This might be a stupid question, but that never stopped me before ;^) 
I've been watching CARP and now that it is in 5.4 I would like to give 
it a try but I am not able to find much information outside of using it 
with PF.

I am curious how apache should be setup. Where httpd.conf requires an IP 
for named based hosting, should the httpd.conf contain the IP of the 
interface or the IP configured with CARP? I believe the carp interface 
is configured directly on top of the physical interface.

That question in mind, am I completely off track here? I currently have

ifconfig_em0="inet 10.0.240.140 netmask 255.255.255.0"
ifconfig_em1="inet 10.0.241.140 netmask 255.255.255.0"
ifconfig_em1_alias0="inet 10.0.241.143 netmask 0xffffffff"
ifconfig_em1_alias1="inet 10.0.241.144 netmask 0xffffffff"
ifconfig_em1_alias2="inet 10.0.241.145 netmask 0xffffffff"
ifconfig_em1_alias3="inet 10.0.241.146 netmask 0xffffffff"
defaultrouter="10.0.241.1"

So from what I have read, simply adding the below should get me setup, 
providing that this is the rc.conf from the master

ifconfig carp0 create
ifconfig carp0 vhid 1 pass sdf899734h 10.0.241.140/24
ifconfig carp1 create
ifconfig carp1 vhid 1 pass sdf899734h 10.0.241.143/24
ifconfig carp2 create
ifconfig carp2 vhid 1 pass sdf899734h 10.0.241.144/24
ifconfig carp3 create
ifconfig carp3 vhid 1 pass sdf899734h 10.0.241.145/24
ifconfig carp4 create
ifconfig carp4 vhid 1 pass sdf899734h 10.0.241.146/24

Thanks,

DAve




More information about the freebsd-questions mailing list