Link to home
Start Free TrialLog in
Avatar of adaheem
adaheem

asked on

cascading sites using squid to an external proxy

Hi
i want squid to cascde sites like youtube.com , vimeo.com , metacafe.com to an external proxy server.
also with some extensions like .exe , .mp3 , .avi . to the same proxy which is: 192.144.44.19:909

any help please.
10x in advanced
Avatar of Maciej S
Maciej S
Flag of Poland image

Avatar of adaheem
adaheem

ASKER

Hi
 
can i have an example for my given please?
 
10x in advanced
Sure :)
Put into your squid.conf:
acl OtherProxy url_regex -i /etc/other_proxy_regex
cache_peer 192.144.44.19 901 parent 901 0
cache_peer_access 192.144.44.19 allow OtherProxy
cache_peer_access 192.144.44.19 deny all

Create also /etc/other_proxy_regex file, which should contain:
youtube\.com
vimeo\.com
metacafe\.com
\.exe$
\.mp3$
\.avi$

Every address or file extension should be on separate line.

Then, restart your squid (or run squid -k reconfigure).
Avatar of adaheem

ASKER

Hi
i pasted it in squid.conf in the first lines.
 

acl OtherProxy url_regex -i /etc/other_proxy_regex
cache_peer 192.144.44.19 parent 909 0
cache_peer_access 192.144.44.19 allow OtherProxy
cache_peer_access 192.144.44.19 deny all
 
and created a file called  : "other_proxy_regex" in /etc
and also pasted all the lines you've mentioned .
 
but nothing taken from proxy 192.144.44.19:909
 
any other help please.
Avatar of adaheem

ASKER

hi
i used this configuration , it works only when i restart squid , but when i open IE again it doesn't take it from the out box proxy . it takes it from my local connection.
only the page opens from the 2nd proxy but not the video of youtube
Here is my confiuration:

acl youtube dstdomain .youtube.com
cache_peer 192.144.44.19 parent 909 3130
cache_peer_access 192.144.44.19 allow youtube
prefer_direct off
Thanks and waiting for your reply
My mistake - path to file should be surrounded with "".
So, change this:
acl OtherProxy url_regex -i /etc/other_proxy_regex
to this:
acl OtherProxy url_regex -i "/etc/other_proxy_regex"
Avatar of adaheem

ASKER

Hi
 
thanks it worked but it is missing something. when i open youtube.com at IE, it starts to take it from the proxy i mentioned, very good. but when i want to click at anything else in the page , it takes it from the main connection and not from the proxy i wanted to redirect the request to.
so i need the sites in the urls to be FORCED to take from the proxy only .
 if the proxy is unavailable, i want the sites in the urls file to give "Page cannot be displayed" not to search for another sources of connection.
 
10x in advanced
ASKER CERTIFIED SOLUTION
Avatar of Maciej S
Maciej S
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of adaheem

ASKER

good , it was a mistake i've made