Currently the setup works for a single domain name. However I want it to work for multiple and also each domain is associated to a different back end server.
Kind Regards,
Dan
Sunil S wrote:
I suppose what Henrik has written is the MOST appropriate, Please try that out.
I am now using squid-3.0 for internal virtual hosts and it works like dream. I had used the setup I suggested in my earlier mail, with IP based hosts + name based virtual host in my private network + squid 2.4.
Still, in case you wish to use the redirect script, the following could
be a simple example:
-----------------------
#!/bin/perl
$|=1;
while(<>){
[EMAIL PROTECTED]://[EMAIL PROTECTED]://10.10.10.10:8880/[EMAIL PROTECTED]; #
10.10.10.10 - your private IP, 8880 - port etc...
[EMAIL PROTECTED]://[EMAIL PROTECTED]://host.domain.com:81/[EMAIL PROTECTED]; # To a
different port
[EMAIL PROTECTED]://[EMAIL PROTECTED]://[EMAIL PROTECTED];
print;
}
-----------------------
Those which are not re-written by redirector script will be fetched by
squid looking up at /etc/host.
Once again, Henrik's mail seems to be the most appropriate set up according to me.
Regards
Sunil
Will this work for named hosts configuration on Apache?Daniel Czarnecki <[EMAIL PROTECTED]> 04/18/04 06:24AM >>>
Also could you send me an example redirection script?
Or give can you give me an example of it's output?
For 1. do you mean the external ip to the Squid box? Or do I need to
create a DNS entry the same as the hosts file on the dns server?
1. Configured DNS to resolve all internal server's names to squid.fetched
2. On squid, populated these names in /etc/hosts with private IP
addresses of the servers. (so that when squid fetch a page it is
from private network)
