Solved

Using Squid as a mirror / cache site - doesn't work..?

Posted on 2001-08-09
1
282 Views
Last Modified: 2010-04-20
hi,

This is my first time using Squid.
I am trying to create a mirror site, mirror.domain1.com in another
server for my web site www.domain1.com which is quite slow to access.
The mirror site is located in another country where it will cater for
faster access to customers in that region.

In mirror.domain1.com, I have squid.conf as :

http_port 80
httpd_accel_host www.domain1.com
httpd_accel_port 80
# httpd_accel_with_proxy on
httpd_accel_uses_host_header on
icp_port 0
cache_effective_user nobody
cache_effective_group nobody
acl QUERY urlpath_regex cgi-bin \? /perl
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
no_cache deny QUERY
redirect_program /usr/local/squid/redirect2.pl
redirect_children 10
redirect_rewrites_host_header off
http_access allow manager localhost
http_access allow all
http_access allow localhost
http_access deny manager
http_access deny all

---------------------------------------------------------------
redirect2.pl is:

#!/usr/bin/perl
$|=1;
while (<>) {
        print($_), next
        if s|mirror.domain1.com(:80)|www.domain1.com|o;
        # send it unchanged to plain apache server (http_docs)
        print;
}

--------------------------------------------------------------
I tested it and it doesn't seem to cache at all.. there is nothing
in access.log which relates to www.domain1.com ..

Can anybody go through my configuration  and let me know what should I
correct or how should I correctly test this better?

Thanks!
0
Comment
Question by:Haho
1 Comment
 
LVL 2

Accepted Solution

by:
hangman earned 100 total points
ID: 6478452
One of your problems is that you have http_access allow all and http_access deny all. Try removing the line which says http_access deny all.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now