Re: [squid-users] cache_dir

2009-02-04 Thread Ralf Peng
2009/2/4 vivian t :
> hi
> if i have /var/spool/dir partation (91 GB)
>
> what should i put in cache_dir ...?
>
> when i execute df -h command i found it's size used 99%
>

so you shouldn't use that partation as cache_dir.
when a partation's free space is less than 20%, it's better not to use that.

Ralf.


Re: [squid-users] Squid as HTTPS Proxy Server

2009-02-02 Thread Ralf Peng
2009/2/2 Keefe John :
> Hello,
>
> I currently have a standard squid proxy server setup doing forward
> proxying.  I'd like to encrypt the traffic between the clients and the
> squid server.  Can squid act as standard proxy and accept HTTPS Proxy
> requests?  I understand that this is not possible in squid 2.x but
> possibly 3.x.

Squid2.x works also well on reverse-proxy for https.
see https_port directive on squid.conf.default.


[squid-users] about half_closed_clients

2009-01-31 Thread Ralf Peng
#   Change this option to 'off' and Squid will keep open connections
#   until a read(2) or write(2) on the socket returns an error.
#   This may show some benefits for reverse proxies. But if not
#   it is recommended to leave OFF.
#
#Default:
# half_closed_clients off


in squid3.0-stable12's squid.conf.default, the statement of above:

Change this option to 'off' and Squid will keep open connections until
a read(2) or write(2) on the socket returns an error.

I think it should be:

Change this option to 'on' and Squid will keep open connections until
a read(2) or write(2) on the socket returns an error.

Is it?

Thanks.
Ralf.


Re: [squid-users] Precaching? Is it possible?

2009-01-30 Thread Ralf Peng
if it's in reverse proxy, it's possible.
write a script to fetch all the links through Squid.

2009/1/30 Matt Browne :
> Hi,
>
> Does anyone know if it's possible to configure precaching in squid. Ie
> squid will follow all the links on a page and cache the contents before
> the user goes there?
>
> I have seen it on other proxies but I can find how to in Squid.
>
> Thanks
>
> Matt
>


Re: [squid-users] performance

2009-01-20 Thread Ralf Peng
2009/1/20 vivian t :
> hi
>  how can i know amount of request per sec and what the amount of
> traffic can accept
>

see "squidclient mgr:info" 's output.
for traffic, could use iptraf tool.

Ralf.


Re: [squid-users] Any one can help me to start squid automatically as service ?

2009-01-11 Thread Ralf Peng
You should edit /etc/rc.local and put this line in it:
/usr/local/squid/sbin/squid -D

not try to put this line in:
echo "/usr/local/squid/sbin/squid -D" >> /etc/rc.local
(or you should run this line in root's shell.)


Ralf.


2009/1/11 Balram :
> Output is as follows :
> /usr/local/squid/sbin/squid D
>
>
> On 1/10/09, Ralf Peng  wrote:
>> 2009/1/10 Balram :
>>> I have added this line in /etc/rc.local but it didn't work.
>>>
>>
>>
>> You run this command by hand and see what does it say?
>>
>> /usr/local/squid/sbin/squid -D
>>


Re: [squid-users] Squid, firewall in suse 9.1

2009-01-11 Thread Ralf Peng
2009/1/11 vaisakh :
>
> Hi all,
> Im working as a system/network admin. We are using suse9.1 for fetchmail.
> its working fine. now thw management wants to make the linux box as our
> firewall and proxy.

Ok since you're using linux as firewall, you may enable iptables.
so use iptables as NAT, that's pretty easy to setup a gateway for
going internet.
also you should know squid proxys only on web, not on others like email.
try google "iptables+nat+masq" that will help you.

Ralf.


Re: [squid-users] Any one can help me to start squid automatically as service ?

2009-01-08 Thread Ralf Peng
2009/1/9 Balram :
> I have installed Squid 3.0 STABLE11 on RHEL-4 on the /usr/local/squid
> folder from source and enabling delay pools. It's work fine. But my
> problem is that I have to start it manually. So any one show me that
> how can squid start automatically as a service.
>

The simple way:

echo "/usr/local/squid/sbin/squid -D" >> /etc/rc.local

( or use chkconfig to register a start script.)


Ralf.


Re: [squid-users] Tuning in compilation

2009-01-08 Thread Ralf Peng
2009/1/8 Rafael Gomes :
> Ralf,
>
> Ok, but I wanna know compilation options that can improve perfomance
> of general application (Normal Proxy cache for more than 200 users).
>
> Thanks

Nothing about compling options AFAIK.
for better performance see these:

http://wiki.squid-cache.org/KnowledgeBase/PerformanceAnalysis
http://wiki.squid-cache.org/BestOsForSquid

Ralf.


Re: [squid-users] Epoll Doubts

2009-01-07 Thread Ralf Peng
2009/1/8 Rafael Gomes :
> Guys,
>
> Please help. I already searched in many websites, squid-cache too, but
> don't find.
>
> Can you please tell me what is epoll?

see:
http://linux.die.net/man/4/epoll


> What this do?

You don't know much about it, just know it's an efficient replacement
of poll/select for IO loop.


>What I can improve
> my Squid with this option?
>

Squid 3 under Linux enables epoll by default when you compile it from sources.
epoll can be used only on Linux kernel.


Ralf.


Re: [squid-users] Tuning in compilation

2009-01-07 Thread Ralf Peng
2009/1/8 Rafael Gomes :
> Guys,
>
> I am making a document with better options for a good one Squid
> compilation, with better option to improve perfomance. So I searched
> in many websites and found following options.
>
> Can you please tell me if there is more good options?
>

There are not at all the so called best options for compling.
There are just the best right options for your special application.
Someone need these options, others need those ones, etc...


Ralf.


Re: [squid-users] HTTP Header

2009-01-07 Thread Ralf Peng
2009/1/7 Mehmet ÇELiK :
> Hello,
>
> I think you understand me wrong or you did not read all of my mail.
> The problem is that:
> I want to change the place of the value at X_FORWARDED_FOR.with REMOTE ADDR.
> I mean,
> when web server looked at to HEADER, It can see the Client IP Address, It
> does not see REVERSE. And I want to make this activite as REMOTE_ADDR.
>
> I want to see the informations as the below:
>
> PHP Code:
>  echo "X_Forward   = ".$_SERVER['HTTP_X_FORWARDED_FOR'];
> echo "Remote_Addr = ".$_SERVER['REMOTE_ADDR'];
> ?>
>
> Web Servers says that:
> X-Forwarded-For = Client IP Address
> Remote Address = Reverse Proxy IP Address
>

Ok I  got your meanings.
If PHP can get remote address by $_SERVER['REMOTE_ADDR'], then it
should always get it by this way, nothing to do with Squid. Also
X-Forwarded-For just behaves well under your case.

Ralf.


Re: [squid-users] squid monitoring

2009-01-07 Thread Ralf Peng
for SNMP with Squid see:
http://wiki.squid-cache.org/SquidFaq/SquidSnmp
http://www.visolve.com/squid/whitepapers/monitoringsquid.php

2009/1/7 vivian t :
> hi
> how can i setup rrdtool & snmpd
>


Re: [squid-users] Defining BL's via acls

2009-01-07 Thread Ralf Peng
2009/1/7 Henrik K :
>
> When using dstdomain with a lot of entries (million), a squid "reload" might
> take tens of seconds. During this time it will refuse clients, which is not
> nice.

That sounds not good.
How about squid's rotating logs, will it also refuse clients at that time?


Ralf.


Re: [squid-users] HTTP Header

2009-01-07 Thread Ralf Peng
2009/1/7 Mehmet ÇELiK :
> Hi all,
>
> I am using Squid as Reverse Proxy for my Web Servers. Client IP Address is
> directing to Web Servers with X_FORWARDED_FOR. But, I want to write Client
> IP Address to Remote_Address..
>

Yes you can.
If I remember that correctly, you should be able to modify
src/HttpHeader.cc and change the string of 'X_FORWARDED_FOR' to what
you wanted then recomplie and install Squid.

Ralf.


Re: [squid-users] How do I see who's connected to my SQUID server?

2009-01-06 Thread Ralf Peng
2009/1/7 Amos Jeffries :
> Rick Chisholm wrote:
>>
>> something basic like netstat -an will give you some info, if you want
>> squid specific info, you can setup cachemgr ...
>>
>
> Or for a quick random dump squidclient.
>
>  squidclient mgr:client_list
>
> reports all the client IPs that connected in the last N hours and some stats
> about their usage. This is identical to the cachemgr page.
>


Amos,

How to know the connection number from Squid to each realserver? Thanks.


Ralf.