Each wiki should set the following:
$wgMobileUrlTemplate = '%h0.m.%h1.%h2.%h3.%h4';
$wgMFMobileHeader = 'X-Subdomain';
A visit to http://en.m.wiki.local.wmftest.net:8080/wiki/Shanghai should send a X-Subdomain header
A visit to http://en.wiki.local.wmftest.net:8080/wiki/Shanghai should not
With the above true, we will be more closely replicating production by running a separate mobile site.