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

From: Tim Duncan <Tduncan_at_imcpl.org>
Date: Tue, 7 Apr 2009 08:02:07 -0400

proxy_yes = "PROXY proxy.baladia.gov.kw:3128";

function FindProxyForURL(url, host)
{
// variable strings to return

if (
        shExpMatch(url, "http://www.baladia.gov.kw*") ||
        shExpMatch(url, "http://host.kmun.gov.kw*") ||
        shExpMatch(url, "http://km_online*")) {
        return "DIRECT";
        
} else {

        return proxy_yes; // Proxy anything else return proxy_yes

        }

-Tim

-----Original Message-----
From: Benedict simon [mailto:simon_at_kmun.gov.kw]
Sent: Monday, April 06, 2009 2:45 PM
To: squid
Subject: [squid-users] squid and proxy.pac file query

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

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

regards

simon

-- 
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 - 12:02:10 MDT

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