Hi Max, thanks a lot for your answer!
On 7/22/2015 11:29 AM, Max Semenik wrote: > On Wed, Jul 22, 2015 at 1:05 AM, Till Kraemer <[email protected] > <mailto:[email protected]>> 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 thought file caching is a fast an easy solution, but thanks for your suggestion, I will give HTTP caching a shot. > 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. Yeah, I just thought this is the way to go, if I want file caching. > 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. Didn't know that. Thanks for pointing that out. > $wgMainCacheType = CACHE_MEMCACHED; > $wgParserCacheType = CACHE_MEMCACHED; # optional > $wgMessageCacheType = CACHE_MEMCACHED; # optional > $wgMemCachedServers = array( "127.0.0.1:11211 > <http://127.0.0.1:11211>" ); > > $wgSessionsInMemcached = true; # optional > > > For single-server setups, APC is faster than memcached. Thanks, that's good to know! I'm gonna check out APC. > $wgFileCacheDirectory = "$IP/cache"; > > > Is it within webserver root? Looks dangerous. Thanks for the warning, but it's not. The path is actually /path/to/webserver/root/project_name/language_code/wiki/cache. Cheers, Till _______________________________________________ Mobile-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mobile-l
