Re: [squid-users] Squid proxy

From: Merdouille <jgerhards_at_r-advertising.com>
Date: Mon, 9 Mar 2009 06:59:11 -0700 (PDT)

Jan-Frode Myklebust-2 wrote:
>
> On 2009-03-06, Merdouille <jgerhards_at_r-advertising.com> wrote:
>>
>> I need to have a squid conf to allow peaople to acces data from url like
>> :
>>
>> http://mysquidproxy/img=http%3A%2F%2Ffiles.macbidouille.com%2Fnews%2F200903%2FAP999.jpg
>> or
>> http://mysquidproxy/img=http://files.macbidouille.com/Fnews/200903/AP999.jpg
>>
>> and i want mysquid to use cache for
>> http://files.macbidouille.com/Fnews/200903/AP999.jpg
>
>
> I recently had a similar problem, but I solved it using apache instead
> of squid. Assuming your squid is running on port 3128/tcp, and you have
> apache listening on 80/tcp. The following apache-config should do what
> you ask (I think):
>
> ProxyRequests On
> ProxyRemote * http://localhost:3128
> ProxyTimeout 600
> ProxyPreserveHost Off
>
> RewriteEngine on
> RewriteRule ^/img=http://(.*) http://$1 [L,P]
>
>
>
> -jf
>
>
>

I tried it for my httpd :

# Activation du proxy
ProxyRequests On
ProxyVia On
# Les proxy peres
ProxyRemote * http://192.168.100.194:81
# Le timeout
ProxyTimeout 600
ProxyPreserveHost Off
RewriteEngine on
RewriteRule ^/img=http://(.*) http://$1 [L,P]
RewriteLog /var/log/httpd/rewrite.log
RewriteLogLevel 3

And my squid on the same computer port 81 :

visible_hostname moi
acl all src all
acl white dstdomain "/etc/squid/white"
acl TRACE method TRACE
acl PUT method PUT
acl POST method POST
acl proxyed urlpath_regex -i "/etc/squid/whitelist"

http_access allow white !POST !PUT !TRACE proxyed
http_access deny !white POST PUT TRACE !proxyed
http_port moi:81
icp_port 0

etc

When i try http://moi/http://somesite/someURL it works but it works for
every site!
My dstdomain white list works no more!

-- 
View this message in context: http://www.nabble.com/Squid-proxy-tp22369482p22413411.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Mon Mar 09 2009 - 13:59:16 MDT

This archive was generated by hypermail 2.2.0 : Tue Mar 10 2009 - 12:00:03 MDT