I was playing around with mediawiki, which is the engine powering wikipedia.de, and had some troubles to have it cooperate with my reverse proxy.
First problem was, that mediawiki was constanly redirecting my request to the apache servers port instead of staying in port 80, which is the reverse proxies port. I had to edit the file
includes/DefaultSettings.php to get it work. my changes in red:
$wgServer = $wgProto.'://' . $wgServerName;
#if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) {
# $wgServer .= ":" . $_SERVER['SERVER_PORT'];
#}
unset($wgProto);
The second problem was, that mediawiki always used the reverse proxies IP address instead of the users IP address. My reverse proxy adds the requestors IP in a new field named HTTP_X_FORWARDED_FOR. I found some documentation
here and set the parameter
That did it for me.
References: