<div dir="ltr"><br><div class="gmail_extra">Thank you for your response, Eliezer.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I added the logformat command that you suggested. I needed to modify it slightly, since I'm running squid 3.1 (I changed <a to <A and removed %>eui). An example of what I am seeing in /var/log/squid/access.log is:</div><div class="gmail_extra"><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div class="gmail_extra"><div class="gmail_extra"><font face="monospace, monospace">1457630282.410 490 172.31.169.175 TCP_MISS/200 4621 GET https://<server>/tw4/index.php/Two - FIRST_UP_PARENT/<a href="http://127.0.0.1">127.0.0.1</a> text/html Q-CC: "max-age=0" "max-age=0" Q-P: "-" "-" REP-CC: "s-maxage=18000, must-revalidate, max-age=0" REP-EXP: "-" VARY: "-"</font></div></div></blockquote><div class="gmail_extra"><div class="gmail_extra"><br></div><div class="gmail_quote">I am testing from a desktop browser (Chrome and IE). I am entering the page address directly rather than doing a browser refresh. I am watching /var/log/squid/access.log and /var/log/httpd/access.log to see what requests squid and apache are receiving.</div><div class="gmail_quote"><br></div><div class="gmail_quote">Thank you,</div><div class="gmail_quote"><br>Cindy<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0)">Hey Cindy,
I do not have too much experience with MediaWIKI but I ran some test on
it in the past for both caching and other things.
I am using this logformat to detect couple things that are related to
caching:
logformat cache_headers %ts.%03tu %6tr %>a %Ss/%03>Hs %<st %rm %ru %[un
%Sh/%<a %mt Q-CC: "%{Cache-Control}>h" "%{Cache-Control}>ha" Q-P:
"%{Pragma}>h" "%{Pragma}>ha" REP-CC: "%{Cache-Control}<h" REP-EXP:
"%{Expires}<h" VARY: "%{Vary}<h" %>eui
access_log daemon:/var/log/squid/access.log cache_headers
The headers:
Cache-Control: s-maxage=18000, must-revalidate, max-age=0
clearly states that the response should not be cached by the client but
supposed to be cached by a surrogate.
How do you test caching? wget? curl? script? netcat? a desktop browser?
Eliezer
On 10/03/2016 16:22, Cindy Cicalese wrote:
><i> I am using Squid for caching with Apache and MediaWiki over HTTPS only.
</i>><i> Unfortunately, no pages are being cached; each request is being sent
</i>><i> from Squid to Apache. I would appreciate help figuring out how to get
</i>><i> caching to work.
</i>><i>
</i>><i> My configuration is as follows:
</i>><i>
</i>><i> * Squid is configured to listen on <external ip>:443 for HTTPS
</i>><i> requests and forwards them to Apache on port 8080
</i>><i>
</i>><i> https_port <external ip>:443 cert=<path to cert> key=<path to key>
</i>><i> defaultsite=<server name> vhost
</i>><i> cache_peer 127.0.0.1 parent 8080 no-query originserver login=PASS
</i>><i>
</i>><i> * Squid also listens on <a href="http://127.0.0.1:80">127.0.0.1:80</a> <<a href="http://127.0.0.1/">http://127.0.0.1:80</a>> for PURGE
</i>><i> requests from MediaWiki because I could not figure out how to
</i>><i> configure MediaWiki to send PURGE requests with HTTPS
</i>><i>
</i>><i> http_port <a href="http://127.0.0.1:80">127.0.0.1:80</a> <<a href="http://127.0.0.1/">http://127.0.0.1:80</a>> defaultsite=<server name> vhost
</i>><i>
</i>><i> * Apache is listening on <a href="http://127.0.0.1:8080">127.0.0.1:8080</a> <<a href="http://127.0.0.1:8080/">http://127.0.0.1:8080</a>> for
</i>><i> requests from Squid
</i>><i> * Apache is also listening on <external ip>:80 which is set up as a
</i>><i> permanent redirect to HTTPS
</i>><i> * MediaWiki is configured as follows:
</i>><i>
</i>><i> $wgUseSquid = true;
</i>><i> $wgSquidServers = array('127.0.0.1'); // this is where PURGE requests
</i>><i> are sent
</i>><i> $wgSquidServersNoPurge = array('<external ip>');
</i>><i>
</i>><i> GET requests are being received by MediaWiki with Cache-Control:
</i>><i> max-age=0 in the headers. The response sent by MediaWiki includes the
</i>><i> following headers:
</i>><i>
</i>><i> Cache-Control: s-maxage=18000, must-revalidate, max-age=0
</i>><i> X-Cache: MISS from <server name>
</i>><i> X-Cache-Lookup: HIT from <server name>:80
</i>><i>
</i>><i> I am suspicious why the last line says port 80 rather than 8080, but I'm
</i>><i> not sure if that is relevant.
</i>><i>
</i>><i> Please let me know if there is an more relevant information that will
</i>><i> help to troubleshoot this. Thank you in advance for your assistance!
</i>><i>
</i>><i> Cindy
</i>></pre></div>
</blockquote></div><br></div></div>