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
Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

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…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

861 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