Quantcast

squid and proxy.pac file query

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

squid and proxy.pac file query

simon dcunha
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.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Squid Reverse proxy cache Storage for Vhosts

Prabhakar, Ramprasad (GE, Corporate, consultant)
For a squid reverse proxy cache, is there a way to set squid to use a
single cache storage for all the virtual hosts it hosts ?

For example,
 abc.domain.com, cde.domain.com, fgh.domain.com all point to the same
site.
 Will Squid storage abc.domain.com/image.png, cde.domain.com/image.png
separately in the cache (even though they are same files?) or will it
use the same cache storage ? If not, can we configure squid to use the
same ?

(or .. Should we use any other param with vhost to setup squid to use
same cache storage for all vhosts ?)

- Ram
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: squid and proxy.pac file query

Chris Robertson-2
In reply to this post by simon dcunha
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

simon dcunha

> 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.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Squid Reverse proxy cache Storage for Vhosts

Amos Jeffries-2
In reply to this post by Prabhakar, Ramprasad (GE, Corporate, consultant)
Prabhakar, Ramprasad (GE, Corporate, consultant) wrote:

> For a squid reverse proxy cache, is there a way to set squid to use a
> single cache storage for all the virtual hosts it hosts ?
>
> For example,
>  abc.domain.com, cde.domain.com, fgh.domain.com all point to the same
> site.
>  Will Squid storage abc.domain.com/image.png, cde.domain.com/image.png
> separately in the cache (even though they are same files?) or will it
> use the same cache storage ? If not, can we configure squid to use the
> same ?
>

You should reduce the domains down and only provide one namespace domain
for the duplicate content. This will solve the caching issue for both
yourself and for the rest of the Internet which is currently struggling
with your multiple domains passing the problem on to every other cache
operator.

Amos
--
Please be using
   Current Stable Squid 2.7.STABLE6 or 3.0.STABLE13
   Current Beta Squid 3.1.0.6
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: squid and proxy.pac file query

Tim Duncan-34
In reply to this post by simon dcunha


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:[hidden email]]
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.

Loading...