Solved

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

Posted on 2001-08-09
1
292 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

705 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