Engin OZTURK yazmış:
 
Merhaba ;
 
arkadaslar acaba ;
 
squid.conf  falanci web sayfasini hic squide sokmadan ac gibi bir sey var mi acaba.. internet explorerde var, ornegin www.abc.com 'icin proxy kullanma diye bir ayar var, bunu ben squid.conf dosyasina yazmak istiyorum ya da ne yapmam lazim acaba..
hoskalin.
 
Ben bu is ve istemcilerin proxy ayarlari icin otomatik yapilandirma dosyasi kullaniyorum. Dosyayi bir apache web sunucusunun root dizinine koydum. Bundan sonra apache'nin conf dosyasina bir kac satir ekleyip apahe yi yeniden baslattim. Apache conf dosyasina ekleneck satir ve pac dosyasi ornegi asagida. Ornekte gorecegin gibi hangi domain lerin proxy kullanmasini istemiyorsan bunu ekliyorsun
 Kolay gelsin
M.Murat AKBAS

apache conf dosyasine eklenecek satir.

AddType application/x-ns-proxy-autoconfig       pac

proxy.pac dosyasi

function FindProxyForURL(url, host)
        {
            //If they have only specified a hostname, go directly.
            if (isPlainHostName(host))
                    return "DIRECT";

            //These connect directly if the machine they are trying to
            //connect to starts with "intranet" - ie http://intranet
            //Connect  directly if it is intranet.*
            //If you have another machine that you want them to
            //access directly, replace "internal*" with that
            //machine's name
            if (shExpMatch( host, "intranet*")||
                            shExpMatch(host, "internal*"))
                return "DIRECT";

            //Connect directly to our domains (NB for Important News)
            if (dnsDomainIs( host,"abc.com")||
            //If you have another domain that you wish to connect to
            //directly, put it in here
                            dnsDomainIs(host,"abcd.com"))
                return "DIRECT";

            //So the error message "no such host" will appear through the
            //normal Netscape box - less support queries :)
            if (!isResolvable(host))
                    return "DIRECT";

            //We only cache http, ftp and gopher
            if (url.substring(0, 5) == "http:" ||
                            url.substring(0, 4) == "ftp:"||
                            url.substring(0, 7) == "gopher:")

            //Change the ":8080" to the port that your cache
            //runs on, and "cache.company.com" to the machine that
            //you run the cache on
                    return "PROXY 193.9.155.7:3128; DIRECT";

            //We don't cache WAIS
            if (url.substring(0, 5) == "wais:")
                    return "DIRECT";

            else
                    return "DIRECT";
        }


Cevap