I had some trouble with mediawiki not sending purges to varnish. nginx listens on port 80 and 443. Requests for port 80 are redirected to 443, because we choose to enforce https. Varnish listens on port 6081. Apache on 8080. The debug log revealed, that mediawiki got 403 moved permanently responses for purge requests. So I looked up on how to change the varnish port number.
Quote from https://www.mediawiki.org/wiki/Manual:$wgSquidServers#Usage_notes_and_history, it says:
Don't specify port number
But I think this is wrong.
includes/SquidPurgeClient.php:
public function __construct( $server, $options = array() ) { $parts = explode( ':', $server, 2 ); $this->host = $parts[0]; $this->port = isset( $parts[1] ) ? $parts[1] : 80; }
$wgSquidServers = array( '127.0.0.1:6081' ); works for me.