A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Manual:$wgSquidServers below:

Manual:$wgSquidServers - MediaWiki

This feature was removed from MediaWiki core in version 1.35.0. Please see $wgCdnServers for an alternative way to use this feature.

Although this variable has the word Squid in it, it can also be used with other caching proxies, like Varnish.

This variable is about telling MediaWiki what are the individual IP adresses of each Proxy servers that serves content to your visitors.

You can also specify port numbers explicitly. However, if you specify port numbers, you need to add the same IP to $wgSquidServersNoPurge , otherwise the server will not be recognized as a configured proxy (known bug T132538).

Note that if you have CIDR ranges (e.g. 192.0.2.0/24), make sure you set them in $wgSquidServersNoPurge instead.

The setting can be used in many Proxy setups, both within a private network or through an external provider, and also with external services that are based on either Varnish or Squid.

Configuration example with Varnish[edit]

Consider the following setup details:

Here are the configurations you have to set in place:

set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip;
// In LocalSettings.php
$wgUseSquid = true;
$wgSquidServers = array();
$wgSquidServers[] = "192.0.2.100"; 
$wgSquidServers[] = "192.0.2.107";
$wgSquidServers[] = "192.0.2.200";
$wgSquidServers[] = "some.internal.name";  // Also works if you have a DNS configured on every MW origins. But it's not recommended.
#$wgSquidServers[] = "192.0.2.0/24";       // WON’T WORK, refer to $wgSquidServersNoPurge

The following IP are for example purpose, defined in from

RFC 5737

.

TODO: Insert example of a valid IPv6 address that is part of 2001:DB8::/32 range as per RFC3849

Usage notes and history[edit]

In versions prior to 1.4.0 this setting was not defined in DefaultSettings.php (although its usage was commented there). This may have been because it wasn't implemented properly or may simply have been an oversight.

Anything described in includes/utils/IP.php should be valid.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4