Solved

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

Posted on 2001-08-09
1
291 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

Portable, direct connect server access

The ATEN CV211 connects a laptop directly to any server allowing you instant access to perform data maintenance and local operations, for quick troubleshooting, updating, service and repair.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Samba Security Improvement for Writable Directories 8 83
Help instaling linux on vmware 36 97
apache and php 3 160
Understanding ping command in Ubuntu 5 63
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

737 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