[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lojban] What's going with CloudFlare and caching and such.
- To: lojban@googlegroups.com
- Subject: Re: [lojban] What's going with CloudFlare and caching and such.
- From: Robin Lee Powell <rlpowell@digitalkingdom.org>
- Date: Wed, 5 Feb 2020 23:49:33 -0800
- Arc-authentication-results: i=2; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of rlpowell@digitalkingdom.org designates 173.13.139.236 as permitted sender) smtp.mailfrom=rlpowell@digitalkingdom.org
- Arc-authentication-results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of rlpowell@digitalkingdom.org designates 173.13.139.236 as permitted sender) smtp.mailfrom=rlpowell@digitalkingdom.org
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:to:from:date:sender:dkim-signature; bh=CFSz1YckA1xQEEzLQq+tMX6uaWMWsGn6ON6wojTHkmE=; b=qk3pxkYM9YmjlTHFootuqvaRQCvxwG2KCqi29iuXQxCgSdssjRbv8D1+QdwiTkK9LV l9dLdI1r+AzHYTgBUvmEaVKGaqHyIZyILN9WRbwDoZP+Kqld7GM9d7x10EVGq10PaRSE WCndBAkDbgmbmB8T4FOJ2qbnDgsqUmZkubG7gLCMgung00TleHMwydnJHWjecHxXi/7K EFHvt1Xt0t0iM9rV2UXF/p2Ws0gNWW7+A56PkeijQfDp4SgD7J0ZSQaG6gmuVbzb0Jfz m5E4oNhUdSCT826ApzpxYyCVjKG6b7E3MP2juHJ9fK7aYH5YUnk6UWTiqTCrM8bwCGjI MFhg==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:to:from:date; bh=h5Yt57CKR/IxPUSc1gBIko3clTLhir0oZ3qARgmmq2k=; b=sWXusNe+pHdWNFO5jPWUXbyOdL2ttpYTFkRtN+wzOuFhyvqtLtLzQ19sPzAmjt0kWU 6liNbCpk21TZOYU7ZYFeELyceo7kGNZybWO7JQrsDsrNyLRrcMLZGAPGQLPweGp+A9Vx oqo2XT94qXSAKd5JHbFQjRv/fJFNOkw1Uofcz6qplSey7d0Q13iw4lHQTt9vvD3zPM1f W/F4YJpumujIJZMIwI9lSYX1l44KlF/eae9s1KyZiw4Y5Ia5ruadTrFuQiOIt7jgt4js jix4iNfl4ZXjayOcKngIP5n10hZ79sGLMFvvnqCln0bghFL5QUu+EG3ioBXtYffyYME3 XMPQ==
- Arc-seal: i=2; a=rsa-sha256; t=1580975376; cv=pass; d=google.com; s=arc-20160816; b=qoDFQjkoFd0iOQm2PJglBGZHmBic/E/JdPi/WZ0OurJ0q75cm7wAF8Sc1Plbdp9JHh 7RF8vP/xTCBgO97F7k2wDuSok+/brfovB6RLwplXnLz/suYR7QnrfPuZbiQZ/kCurG4d 6G5QtOXlR6yGI4jr0VMnR7dv5u/0GN2tMWD/I/fFXw6ELcpMKdK6sZgKKAw4/n0P7ocq 5gThlaUxXQ1ETPpS/rAYBgQKrK3VKbTm50BeUBAoVDNxsaEhguPsQ2kp/NbxwlYbsZ+0 hMeysbtsDUoQI9kcPGVT2GYP5fi6bNNWif8dJrEhnTdUku9mdYEi00cUWR8wiY+fIS2G xHHg==
- Arc-seal: i=1; a=rsa-sha256; t=1580975375; cv=none; d=google.com; s=arc-20160816; b=AVUH66CmmxbrQiEkswhZDUCzVo7iSlozLWg3DblknnF+Lywhe9aS68I+y+B3GiZNEj mZA4Y8SH9YU8d3ZYt4ICCEhqZAJf5uZcOOFe4g9Der70UX7COFPMNZz6QtsdjUauQi5I JD0r3rz/y75/d5ugz5udPvDyNMfqtBmFUTAguit3d+ibVLdzko3ioVUBYs6Ep0Y3XA1N 4V1/xCiWP5Re37Opu/BRQpgUeJb8PeYY361q+ZurTzW6GRYrVvCN4QjSdgZQqPr/LiUp y4DFnf7HOj5MV9gPAo8bfs/GiZyGvHRVKTRg7eO09LgJ21NOlPxAtWsMwPWY8ILTgzNY Wo6g==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=CFSz1YckA1xQEEzLQq+tMX6uaWMWsGn6ON6wojTHkmE=; b=kcHWmhZjAbeCS4U04kyxOlu8WU5z9aZaadDotV7Q1rYL0eQQ1e+IX5/BSjW0s1+cuD JBFFj9y6U6eFde6Ifvz9MYTtv5Ly8ojLUkDdEBgiQv2a4Edh7keUEm8f7prM00pzHR33 CiulkUnfTa2NvDGp9lZkLKRaBQ9eYKAevPsDAubBbS+DGs/jtPr7SZDvAcLlzPtEO/Gg 4rI4WADNymHcY6uz4XXIisEysLxqDtsD6wwpg8S1hSgb3u8B/bpHSy7Rwf0ItAHeVVBU xEtIWSBtOgsVMw5WzqOozRQHOS6qbeJtd5aGZ53jmCOoVAk1DEICdMOUKsAj+ky05qyz YaeQ==
- In-reply-to: <20200206062919.GU26741@stodi.digitalkingdom.org>
- List-archive: <https://groups.google.com/group/lojba>
- List-help: <https://groups.google.com/support/>, <mailto:lojban+help@googlegroups.com>
- List-id: <lojban.googlegroups.com>
- List-post: <https://groups.google.com/group/lojban/post>, <mailto:lojban@googlegroups.com>
- List-subscribe: <https://groups.google.com/group/lojban/subscribe>, <mailto:lojban+subscribe@googlegroups.com>
- List-unsubscribe: <mailto:googlegroups-manage+1004133512417+unsubscribe@googlegroups.com>, <https://groups.google.com/group/lojban/subscribe>
- Mail-followup-to: lojban@googlegroups.com
- Mailing-list: list lojban@googlegroups.com; contact lojban+owners@googlegroups.com
- References: <20200206062919.GU26741@stodi.digitalkingdom.org>
- Reply-to: lojban@googlegroups.com
- Sender: lojban@googlegroups.com
- User-agent: Mutt/1.11.3 (2019-02-01)
On Wed, Feb 05, 2020 at 10:29:19PM -0800, Robin Lee Powell wrote:
> Some of you have noticed problems with dynamic content on lojban.org
> now that we've started using CloudFlare. I haven't been able to
> figure out how to fix this, so here's what's going on; maybe
> somebody else will have ideas.
>
> So the goal of CloudFlare, primarily, was to make it so that if my
> server went down, the site would be basically fine. This we have
> acheived.
>
> However, to do so, I had to use brute force. Here's our CloudFlare
> page rules:
>
> *lojban.org/*&* Cache Level: Bypass
> *lojban.org/*edit* Cache Level: Bypass
> *lojban.org/*Special:* Cache Level: Bypass
> *lojban.org/*Talk:* Cache Level: Bypass
> *lojban.org/* Browser Cache TTL: 30 minutes, Always Online: On, Cache Level: Cache Everything, Edge Cache TTL: 2 hours, Origin Cache Control: Off
>
> That last one is a very large hammer that says "just cache the hell
> out of everything".
>
> The reason I need that hammer is that mediawiki is returning
> absurdly wrong caching headers. Here's an example that entirely
> bypasses CloudFlare:
>
> $ curl -k -v -H 'Host: mw.lojban.org' -L https://jukni.lojban.org/papri/pronunciation 2>&1 | less
> [snip]
> < HTTP/1.1 200 OK
> < Date: Thu, 06 Feb 2020 06:26:31 GMT
> < Server: Apache/2.4.38 (Debian)
> < X-Powered-By: PHP/7.3.14
> < X-Content-Type-Options: nosniff
> < Content-language: en
> < Vary: Accept-Encoding,Cookie
> < Expires: Thu, 01 Jan 1970 00:00:00 GMT
> < Cache-Control: private, must-revalidate, max-age=0
>
> ^^ That. That Cache-Control line is absurd, and effectively
> completely disableds CloudFlare.
FWIW, I turned the test site on at , for example ,
http://mw-test.lojban.org/papri/Pronunciation (which is a very
simple, static page).
If you look at the headers there you'll see:
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Pragma: no-cache
And below is the entire LocalSettings.php file for the test site; as
you can see it's absurdly simple.
So, again, I have no idea why mediawiki is saying not to cache the
pages ever.
Also, $wgUseSquid = true; makes no difference.
- ------------
$ cat /var/www/mediawiki/LocalSettings.php | grep -v '^#'
<?php
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
$wgSitename = "Lojban";
$wgMetaNamespace = "Lojban";
$wgScriptPath = "";
$wgScriptExtension = ".php";
$wgArticlePath = "/papri/$1";
//$wgArticlePath = "/wiki/$1"; # Virtual path. This directory MUST be different from the one used in $wgScriptPath
$wgServer = "http://mw-test.lojban.org";
$wgCanonicalServer = "http://mw-test.lojban.org";
$wgStylePath = "$wgScriptPath/skins";
$wgDBtype = "mysql";
$wgDBserver = "jukni:11036"; # Not 'localhost'; that will try to do a socket connection, instead of TCP
$wgDBname = "mediawiki";
$wgDBuser = "root";
$wgDBpassword = "[snip]";
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
$wgDBmysql5 = true;
- ------------
--
You received this message because you are subscribed to the Google Groups "lojban" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lojban+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lojban/20200206074933.GV26741%40stodi.digitalkingdom.org.