If you want Apache to listen on all IP addresses assigned to the machine you can simply specify a bind directive without any IP address, for example:
Listen 80
If you need to bind to only a subset of assigned addresses a possible solution to this is to ensure that both IP addresses are always assigned to the machine even while they are not assigned to the physical interface.
From question and comments I understand that you are currently using BSD, but are open to other platforms if that will solve the problem. Following is how I did something very similar on Ubuntu. I expect that some variation of this would also work on BSD, but I don't have enough BSD knowledge to give a detailed solution for BSD.
Linux has a dummy
network driver with a dummy interface called dummy0
which you can assign IP addresses to. Those IP addresses will be considered local just the same as IP addresses assigned to physical interfaces, so Apache can bind to them.
In /etc/network/interfaces
I added a post-up
line like this:
post-up /usr/local/sbin/eth0-post-up
And in /usr/local/sbin/eth0-post-up
I then loaded the dummy
driver and configured all the IP addresses I needed:
#!/bin/bash
modprobe dummy
ip address add dev dummy0 10.58.249.248/32
ip address add dev dummy0 10.138.65.134/32