Last modified: 2014-08-18 23:56:27 UTC
The main use case for this would be browser testing, e.g. with the modern.ie VMs. This is my current method: in the IE VM add 10.0.2.2 whatever to the host file; in the vagrant VM set $wgServer = "http://whatever:8080"; in LocalSettings.php, and you can access the MediaWiki installation from the IE VM via http://whatever:8080. Obviously this would be a lot easier if I didn't have to edit $wgServer every time I want to switch browsers; could we just add something like if ( isset( $_SERVER['SERVER_NAME'] ) ) { $wgServer = 'http://' . $_SERVER['SERVER_NAME'] . ':8080'; } else { $wgServer = "http://127.0.0.1:8080"; } to the default mw-vagrant LocalSettings file? (Making the port configurable in the vagrantfile would be even better, for people who run multiple vagrants, but that's another issue.)
This also blocks the use of `vagrant share` to share a local wiki with a remote colleague using Vagrant Cloud <https://vagrantcloud.com/>.
Change 154941 had a related patch set uploaded by BryanDavis: Set $wgServer from inbound request https://gerrit.wikimedia.org/r/154941
Change 154941 merged by jenkins-bot: Set $wgServer from inbound request https://gerrit.wikimedia.org/r/154941