On Nov 17, 2004, at 1:07 PM, John Fink wrote:
I'm faced with installing Mediawiki on a machine
which has a slightly
strange network topology. Basically, there are two interfaces on the
machine: one answers to
machine.net1.example.com and the other to
machine.net2.example.com. Computers on the net1 local subnet are
blocked from accessing the machine over the net2 interface; same goes
for net2 machines trying to get to net1.
Yuck. :) You have my sympathies.
Apache considers the machine.net1 address
to be canonical, so after Mediawiki installs a machine that tries to
reach the Mediawiki install from net2 has their URL redirected to the
canonical net1 address, and therefore is blocked.
Something like this in your LocalSettings.php should work:
if( $_SERVER['HTTP_HOST'] == 'machine.net2.example.com' ) {
$wgServer = 'http://machine.net2.example.com';
}
Note that you should not simply blindly stick the HTTP_HOST value in
$wgServer; this value is supplied by the client and could possibly be
exploited to some effect by a malicious client.
-- brion vibber (brion @
pobox.com)