Last modified: 2007-09-16 12:43:14 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 9896 - X-FORWARDED-FOR related documentation patch
X-FORWARDED-FOR related documentation patch
Product: MediaWiki
Classification: Unclassified
Documentation (Other open bugs)
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2007-05-13 12:32 UTC by Loic Dachary
Modified: 2007-09-16 12:43 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---

Patch to DefaultSettings.php for documentation purpose. (730 bytes, patch)
2007-05-13 12:33 UTC, Loic Dachary

Description Loic Dachary 2007-05-13 12:32:32 UTC
Although running mediawiki behind a reverse proxy is common, it is suprisingly
difficult to figure out how to have mediawiki honor the X-FORWARDED-FOR header,
and the solution is somewhat counter-intuitive (i.e. adding the IP of the proxy
to SquidServers). Hopefully this small documentation patch will allow people
looking for the keywords related to the problem to find the proper solution.
When loooking in the mediawiki web site at the moment, there is no match for

Index: DefaultSettings.php
--- DefaultSettings.php	(revision 22142)
+++ DefaultSettings.php	(working copy)
@@ -1230,7 +1230,11 @@
  * A list of proxy servers (ips if possible) to purge on changes don't specify
- * ports here (80 is default)
+ * ports here (80 is default). When mediawiki is running behind a proxy, its
+ * address should be listed in $wgSquidServers otherwise mediawiki won't rely
+ * on the X-FORWARDED-FOR header to determine the user IP address and
+ * all users will appear to come from the proxy IP address. Don't use domain
+ * names here, only IP adresses.
 # $wgSquidServers = array('');
 $wgSquidServers = array();
Comment 1 Loic Dachary 2007-05-13 12:33:12 UTC
Created attachment 3634 [details]
Patch to DefaultSettings.php for documentation purpose.
Comment 2 Antoine "hashar" Musso (WMF) 2007-05-13 12:44:49 UTC
Committed in r22144.
Comment 3 Emufarmers 2007-09-09 21:08:36 UTC
It seems to say that it's best if the proxy servers be listed as IPs, and then that they _must_ be listed as IPs.  Could this be clarified?
Comment 4 Rob Church 2007-09-16 12:43:14 UTC
Further clarified documentation in 25880.

Note You need to log in before you can comment on or make changes to this bug.