[squid-users] Thnaks Re: [squid-users] squid and proxy.pac file query

From: Benedict simon <simon_at_kmun.gov.kw>
Date: Tue, 7 Apr 2009 08:32:49 +0300 (AST)

> Benedict simon wrote:
>> Dear All,
>>
>>
>> I am sorry if i posting it to the wrong group
>> I have Centos OS 5.2 server with squid-2.6.STABLE6-5.el5_1.3 running
>> perfect for quite some time
>>
>> we have a couple of local intranet web sites which are working with or
>> without the bypass proxy server for local address in their browsers.
>>
>> now our intranet sites gonna increase by about 10 more servers and would
>> like to implement a proxy.pac file
>>
>> after googling and trying out a couple of options i am still not able to
>> get it workin succesfully
>>
>> here below r my details
>>
>> proxy.pac file in /var/www/html .. the apache root
>> -----
>> #
>> function FindProxyForURL(url, host)
>> {
>> // variable strings to return
>> var proxy_yes = "PROXY proxy.baladia.gov.kw:3128";
>> var proxy_no = "DIRECT";
>> if (shExpMatch(url, "http://www.baladia.gov.kw*")) { return proxy_no; }
>> if (shExpMatch(url, "http://host.kmun.gov.kw*")) { return proxy_no; }
>> if (shExpMatch(url, "http://km_online*")) { return proxy_no; }
>> // Proxy anything else
>> return proxy_yes;
>> }
>> -----------------------
>>
>> apache is workin fine cause if i run the command in the browser address
>> http://proxy.baladia.gov.kw/proxy.pac I do get a prompt to save or open
>> the proxy.pac file
>>
>>
>> i have added the followin in /etc/mimetypes
>>
>> application/x-ns-proxy-autoconfig pac
>>
>> also in my /etc/http/conf/httpd.conf file i have
>>
>> AddType application/x-ns-proxy-autoconfig .pac
>>
>> now in my client browser IE 6 i have in lan setting ==>Use automatic
>> configuration script selected n
>> have..http://proxy.baladia.gov.kw/proxy.pac
>>
>> now when i start the browser on the client i am not able to browse
>>
>> i check the apache access log
>>
>> every time i start the browser i get one line of log
>>
>> 172.16.2.21 - - [06/Apr/2009:18:24:16 +0300] "GET /proxy.pac HTTP/1.1"
>> 200
>> 414 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Win32)"
>>
>> also in my squid access logs i dont see anything
>>
>
> This indicates there is a problem with the PAC file itself.
>
>> cant figure out what i could be missing or where i could be goin wrong
>> i would highly apprecite if you someone could help me out
>>
>
> Try a simplified file, such as...
>
> function FindProxyForURL(url,host)
> {
> return "PROXY proxy.baladia.gov.kw:3128";
> }
>
> ...which should cause the browser to use proxy for everything.
>
>> regards
>>
>> simon
>>
>
> Chris

Thanks Chris and apprecite your quick reply.
i will try the siple version of pac file and check it out

rgards

simon

>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>

-- 
Network ADMIN
-------------
KUWAIT MUNICIPALITY:
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Tue Apr 07 2009 - 05:14:40 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 07 2009 - 12:00:02 MDT