Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 23rd January 2009, 19:49
tomdkat tomdkat is offline
Junior Member
 
Join Date: Nov 2008
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
Default Question on: How To Set Up A Caching Reverse Proxy With Squid 2.6 On Debian Etch

First, thanks for posting the great tutorial!

http://www.howtoforge.com/how-to-set...debian-etch-p2

We're trying this out now since we want to cache static pages generated by PHP. I don't know if this changes the classification of the page from "static" to "dynamic".

Anywho, we're interested in caching pages generated by PHP. We've got our PHP-based web app sending the correct Cache-control header to Squid (we're using Squid 3.0-STABLE12) and we're NOT sending any Expires or related headers. Using the Live HTTP Headers Firefox extension, I can see the response from Squid and it's generating a TCP_MISS each time I load the page:

Code:
HTTP/1.x 200 OK

Date: Fri, 23 Jan 2009 17:39:39 GMT

Server: Apache/2.2.3 (Red Hat)

X-Powered-By: PHP/5.2.8

Cache-Control: must-revalidate, max-age=0, s-maxage=10800

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 11237

Content-Type: text/html; charset=ISO-8859-1

X-Cache: MISS from www.mysite.com

Via: 1.0 www.mysite.com (squid/3.0.STABLE12)

Connection: keep-alive
Code:
HTTP/1.x 200 OK

Date: Fri, 23 Jan 2009 17:41:26 GMT

Server: Apache/2.2.3 (Red Hat)

X-Powered-By: PHP/5.2.8

Cache-Control: must-revalidate, max-age=0, s-maxage=10800

Vary: Accept-Encoding

Content-Encoding: gzip

Content-Length: 11233

Content-Type: text/html; charset=ISO-8859-1

X-Cache: MISS from www.mysite.com

Via: 1.0 www.mysite.com (squid/3.0.STABLE12)

Connection: keep-alive
Is it possible the tutorial doesn't apply to Squid 3? Any ideas?

Thanks!

Peace...
Reply With Quote
Sponsored Links
  #2  
Old 24th January 2009, 14:17
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,748 Times in 2,579 Posts
Default

Quote:
Originally Posted by tomdkat View Post
Is it possible the tutorial doesn't apply to Squid 3?
Yes, that's possible. Unfortunately lots of things change between the Squid versions. Try 2.6.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 25th January 2009, 01:56
tomdkat tomdkat is offline
Junior Member
 
Join Date: Nov 2008
Posts: 2
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Ok, I got my problem figured out.

The problem was with my use of basic authentication being used to protect the site I'm currently testing with Squid acting as a HTTP accelerator.

Once I added a "public" Cache-Control header to the mix, everything started working just fine AND with Squid 3.0-STABLE12.

The only thing is with Squid 3, you will get these warning messages in the cache.log file:
Code:
2009/01/24 17:46:54| ACL::checklistMatches WARNING: 'cookie_logged_in_set' ACL is used but there is no HTTP reply -- not matching.
2009/01/24 17:46:54| ACL::checklistMatches WARNING: 'cookie_logged_in_out' ACL is used but there is no HTTP reply -- not matching.
This is due to the use of the rep_header ACL acltype being used. Apparently, at the time that ACL is processed, the request to the origin server hasn't been made yet so there won't be any HTTP reply to process:

http://www.squid-cache.org/mail-arch...0901/0501.html

In any event, things seem to be working just fine now!

Thanks!

Peace...
Reply With Quote
The Following User Says Thank You to tomdkat For This Useful Post:
falko (25th January 2009)
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about Running ISPConfig On Port 80 Using Apache's Reverse Proxy Feature VMartins Installation/Configuration 14 9th October 2008 19:47
Scheduled Backups With Rsyncbackup On Debian Etch question overdose HOWTO-Related Questions 2 30th August 2008 04:00
Squid Proxy Caching on Linux obzerver Installation/Configuration 4 13th August 2008 20:51
Question on Virtual Users And Domains With Postfix, Courier And MySQL (Debian Etch) Horizon HOWTO-Related Questions 12 26th February 2008 21:22
The Perfect Setup - Debian Etch (Debian 4.0) mysql question paul55 HOWTO-Related Questions 9 4th November 2007 12:28


All times are GMT +2. The time now is 10:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.