Search squid archive

Re: Strange problem with Monkey HTTP Daemon, Squid 3 and localhost

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/10/10 00:08, SimÃn wrote:
El 06/10/10 01:42, Amos Jeffries escribiÃ:

<snip>
I have cleared the Squid cache with:
ââââââââââââââââââââââââââââââ

sudo service squid stop
sudo rm -Rf /var/cache/squid/*
sudo squid -z
sudo service squid start

ââââââââââââââââââââââââââââââ
But it still works without webserver!
After, I have reset the PC (disabling "Monkey HTTP Daemon" start) and
Squid still works with Bannerfilter but without webserver!
Moreover, I have modified several HTML files, in directory containing
the HTML and graphics files of Bannerfilter, but Squid shows the old
files!
I don't understand nothing. How can be this possible!?
web browser cache?
No, it was cleared too. It's cleared every time that I close the browser.
You are running "Monkey HTTP Daemon" on your web browser local host?
Yes, everything (squid, webserver, browser, etc...) is in the same PC.
By other hand, I can't access to localhost directly from browser (with
or without "Monkey HTTP Daemon").
Of course. You are using a "transparent" interception proxy. "localhost"
and "127.0.0.1" and "[::1]" in the browser address bar on these setups
means the machine your browser runs on
Ok, but it's the same machine.
They only ever mean the proxy machine when the browser is configured to
pass requests to the proxy. Without performing it's own DNS on the URI
which would resolve them to itself.
I don't understand this at all (sorry, my english isn't very good).

My questions:
1) How can Squid serves objects (images, html pages, etc...) from
http://localhost if there isn't any webserver running?

Answer is simple. Without existing cache content it can't. So after that rm + squid -z there *has* to be something running.

Since you are doing URL re-write instead of HTTP redirect your Squid log should contain DIRECT/*.*.*.* with the IP address it fetched from. Check that its localhost or 127.0.0.1 etc.

netstat on your machine will display whether the HTTP server really has stopped or not.

2) Why the browser can't access directly to the webserver (when the
webserver is up)? This question isn't very important, it's only curiosity.

Since you have the on the same machine the browser can normally get anywhere Squid can. Maybe your NAT rules doing the interception are different for each app.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.8
  Beta testers wanted for 3.2.0.2


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux