On Wed, Jul 22, 2015 at 1:05 AM, Till Kraemer info@till-kraemer.com wrote:
Hi,
I'm still trying to figure out what's the best solution for mobile subdomains combined with file caching.
Why do you want file caching in the first place? It's a semi-supported kludge for people on shared hosts. You already use nginx, just set it up for HTTP caching.
I'm planning to copy the MediaWiki installation files for the mobile version to a separate folder (m) and link the subdomain to that folder while using the same database like the desktop version. Or is there a better way?
Don't duplicate files for multiple. There are vhosts and, in worst case, symlinks for that. And remember that mobile site is not even a separate wiki, it's just a different view of the same thing.
Can it cause any problems if one database shares two installations?
You would get a polluted parser cache containing URLs to both mobile and desktop site. That's why WMF rewrites the host header internally so that technically it looks like the same site to all code except for a few pieces that care about mobile.
$wgMainCacheType = CACHE_MEMCACHED; $wgParserCacheType = CACHE_MEMCACHED; # optional $wgMessageCacheType = CACHE_MEMCACHED; # optional $wgMemCachedServers = array( "127.0.0.1:11211" );
$wgSessionsInMemcached = true; # optional
For single-server setups, APC is faster than memcached.
$wgFileCacheDirectory = "$IP/cache";
Is it within webserver root? Looks dangerous.