RE: [squid-users] accel mode duplicating requests.

From: Henrik Nordstrom <hno@dont-contact.us>
Date: 12 Feb 2003 21:35:11 +0100

Put your primary public domain name which users should get if their
browser do not support the Host header.

This is equal to the first host definiton for a name based Apache port..

This directive is mainly used together with httpd_accel_host to
determine which domin the user requested.

The other use of httpd_accel_host is with httpd_accel_single_host on..
but as you are not using this directive and instead using a redirector
this does not matter to you.

Regards
Henrik

ons 2003-02-12 klockan 21.46 skrev Thiago Madeira de Lima:
> Well, seens like I messes things up. :) Thanks alot for your help.
>
> But I'm still with a doubt. What IP should I put in httpd_accel_host?
>
> Squid internal IP, External IP fowarded to Squid using nat or my apache
> internal IP?
>
> Reading the docs I assumed that I should use the apache IP, but if I set
> that how can I the same squid to accel to more hosts?
>
> thanks alot,
> thiago lima.
>
>
>
>
>
>
> -----Original Message-----
> From: Henrik Nordstrom [mailto:hno@squid-cache.org]
> Sent: Wednesday, February 12, 2003 4:17 PM
> To: Thiago Madeira de Lima
> Cc: squid-users@squid-cache.org
> Subject: RE: [squid-users] accel mode duplicating requests.
>
>
> httpd_accel_host is IP based virtual hosting, not domain based virtual
> hosting..
>
> The domain based virtual hosting is accomplished by
> "httpd_accel_uses_host_header on".
>
> So unless you have many IP addresses on your Squid server and want Squid
> to use the IP address it received the request on as host when no Host
> header is provided then "httpd_accel_host virtual" is not what you want.
>
> Regards
> Henrik
>
> ons 2003-02-12 klockan 19.07 skrev Thiago Madeira de Lima:
> > Thanks Henrik,
> >
> > I can't use the httpd_accel_host because I have many sites in
> the
> > apache, and I'm going to add another apache server, so I need to use
> > the external redir options.
> >
> > The 192.168.1.254 is not my machine address. If I ping it from
> the
> > machine I can't reach anything. :(
> >
> > And I can't use the native squid format because I use webalizer
> to
> > process the log and provide statistics to the websites. There're
> > hosting customers.
> >
> > Thanks.
> > Thiago.
> >
> > -----Original Message-----
> > From: Henrik Nordstrom [mailto:hno@squid-cache.org]
> > Sent: Wednesday, February 12, 2003 1:55 PM
> > To: Thiago Madeira de Lima
> > Cc: squid-users@squid-cache.org
> > Subject: Re: [squid-users] accel mode duplicating requests.
> >
> >
> > Try if you use
> >
> > httpd_accel_host www.foo.bar
> >
> >
> > I would guess 192.168.1.254 is the IP address of your Squid server.
> > The log is quite consistent with a Squid talking to himself..
> >
> > Are you maybe using any redirect_access lines which may prevent the
> > request from being seen by your redirector?
> >
> >
> > Also I recomment to use the native log format. Contains more
> > information on how/when/why Squid sent the request, specifically which
>
> > IP address the request was sent to when going DIRECT...
> >
> > Regards
> > Henrik
> >
> >
> > ons 2003-02-12 klockan 16.15 skrev Thiago Madeira de Lima:
> > > Hi,
> > >
> > > I'm having a little trouble (or maybe misconfiguration) with
> > > squid.
> > >
> > > I'm using squid behind a firewall (nat) as http acelerator for
> > > an
> > > apache.
> > >
> > > My conf looks like this :
> > >
> > > real ip
> squid
> > > internal ip apache
> > > 200.200.200.200:80 -> redirects using iptables to squid ->
> > > 192.168.0.6:80 -> call apache -> 192.168.0.7:80
> > >
> > >
> > > I'm using a redir program homemade, that rewrites www.foo.bar to
> > > isrvwww.foo.bar.
> > >
> > > My DNS www.foo.bar points to 200.200.200.200 and isrvwww.foo.bar
> > > points to 192.168.0.7. Squid is configured to not rewrite the host
> > > header.
> > >
> > >
> > > My problem is that squid is that squid is duplicating all
> > > requests.
> > >
> > > When I issue a GET command squid's access log displays :
> > >
> > > 192.168.1.254 - - [12/Feb/2003:12:05:20 -0200] "GET
> > > http://www.foo.bar/ HTTP/1.0" 200 4797 TCP_MISS:DIRECT 200.158.30.40
> -
> >
> > > - [12/Feb/2003:12:05:20 -0200] "GET http://www.foo.bar/ HTTP/1.1"
> > > 200
> > > 4836 TCP_MISS:DIRECT
> > >
> > > Somehow all requests seens to be from 192.168.1.254, but there's
> > > NO
> >
> > > 192.168.1.254 network. My network is 192.168.0.0 .
> > >
> > > The line 200.158.30.40 is the real request.
> > >
> > > I had to block the Via: header to make squid works, otherwise it
> > > broke some sites saying that it was in a loop.
> > >
> > > Some relevant part of my squid.conf
> > >
> > > httpd_accel_port 80
> > > httpd_accel_host virtual
> > > httpd_accel_single_host off
> > > httpd_accel_with_proxy off
> > > httpd_accel_uses_host_header on
> > >
> > > Any tips?
> > >
> > > Thanks alot
> > > Thiago.
> > >

-- 
Henrik Nordstrom <hno@squid-cache.org>
MARA Systems AB, Sweden
Received on Wed Feb 12 2003 - 13:40:43 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:13:21 MST