squid config question

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

squid config question

Toratheus
> I am just getting started with 2.6 S13 and was looking to run it
> against my mediawiki server as an Http Accelerator. Right now it's on
> the same box and I plan to move it here shortly. But first I just want
> to make sure I have it working correctly. Can anyone give a look at
> the below config and tell me if I have it right?
>
> http_port [IPADDRESS]:80 accel defaultsite=127.0.0.1
> cache_peer 127.0.0.1 parent 80 0 no-query originserver login=PASS
> acl WIKIip dst [IPADDRESS]
> acl WIKI dstdomain [HOSTNAME AND DOMAIN]
> acl all src 0/0
> http_access allow all
> visible_hostname [HOSTNAME AND DOMAIN]
> cache_peer_access HOSTNAME AND DOMAIN] allow all
>
>
> I keep seeing 2007/06/05 02:14:26| squid.conf, line 8: No cache_peer
> '[HOSTNAME AND DOMAIN]' in the logs as well as
>
>  
> 1181018880.588 RELEASE -1 FFFFFFFF EDA21F66F576C00321CD3282489FBD30
> 200 1181018878        -1 1181018878 text/html 7335/7335 GET [WIKI
> URI]/index.php/Special:Recentchanges
> 1181018880.700 RELEASE -1 FFFFFFFF 478A4353B1F718D5D89D8AB6FD56A98E
> 304 1181018880        -1        -1 unknown -1/0 GET [WIKI
> URI]/skins/common/commonPrint.css
> 1181018880.789 RELEASE -1 FFFFFFFF 572ADF9D17F262131CCEA7236F3D553F
> 304 1181018
> 880        -1        -1 unknown -1/0 GET [WIKI
> URI]/skins/fiwiki/main.css?
>
>
> Should "RELEASE" be there in the logs for everything but images?
> Anyone have a sample squid.conf and a LocalSetting.php from mediawiki
> that they would be willing to share?
> Thanks again,
> Seth
Reply | Threaded
Open this post in threaded view
|

Re: squid config question

Chris Robertson-2
Ford, Seth wrote:

>> I am just getting started with 2.6 S13 and was looking to run it
>> against my mediawiki server as an Http Accelerator. Right now it's on
>> the same box and I plan to move it here shortly. But first I just want
>> to make sure I have it working correctly. Can anyone give a look at
>> the below config and tell me if I have it right?
>>
>> http_port [IPADDRESS]:80 accel defaultsite=127.0.0.1
>> cache_peer 127.0.0.1 parent 80 0 no-query originserver login=PASS
>> acl WIKIip dst [IPADDRESS]
>> acl WIKI dstdomain [HOSTNAME AND DOMAIN]
>> acl all src 0/0
>> http_access allow all
>>    

Ack.  This is just begging for abuse.  Better would be:

acl WIKIport port 80
http_access allow WIKIip WIKIport
http_access deny all

>> visible_hostname [HOSTNAME AND DOMAIN]
>> cache_peer_access HOSTNAME AND DOMAIN] allow all
>>
>>
>> I keep seeing 2007/06/05 02:14:26| squid.conf, line 8: No cache_peer
>> '[HOSTNAME AND DOMAIN]' in the logs as well as
>>    

You have not defined a cache_peer of [HOSTNAME AND DOMAIN].  The only
cache_peer you have defined is 127.0.0.1.  Considering you are not going
to send requests to different cache_peers, this line is superfluous.

>>  
>> 1181018880.588 RELEASE -1 FFFFFFFF EDA21F66F576C00321CD3282489FBD30
>> 200 1181018878        -1 1181018878 text/html 7335/7335 GET [WIKI
>> URI]/index.php/Special:Recentchanges
>> 1181018880.700 RELEASE -1 FFFFFFFF 478A4353B1F718D5D89D8AB6FD56A98E
>> 304 1181018880        -1        -1 unknown -1/0 GET [WIKI
>> URI]/skins/common/commonPrint.css
>> 1181018880.789 RELEASE -1 FFFFFFFF 572ADF9D17F262131CCEA7236F3D553F
>> 304 1181018
>> 880        -1        -1 unknown -1/0 GET [WIKI
>> URI]/skins/fiwiki/main.css?
>>
>>
>> Should "RELEASE" be there in the logs for everything but images?
>>    

Have you verified that these pages are cacheable?  The cacheability
engine (http://www.web-caching.com/cacheability.html) will be of help in
this matter.

>> Anyone have a sample squid.conf and a LocalSetting.php from mediawiki
>> that they would be willing to share?
>>    

Here's the relevant bits of my accelerator setup for a MoinMoin wiki*:

http_port 80 defaultsite=wiki.mydomain
http_port 10.100.60.42:8000 defaultsite=wiki.mydomain
cache_peer 127.0.0.1 parent 8000 0 no-query originserver
acl to_localhost dst 127.0.0.0/8
acl to_localIP dst 10.100.60.42/32

# Standard ACLs defining Safe_ports, SSL_ports and CONNECT method go here

http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow to_localhost
http_access allow to_localIP
http_access deny all

>> Thanks again,
>> Seth
>>    

Chris

* Wiki and Squid are running on the same box.  The hosts file, and DNS
both relate wiki.mydomain to 10.100.60.42.  No special setup was
performed on the Wiki, other than binding it to the loopback interface.  
Squid acceleration was done more for the experience than for any
performance gains.