[squid-users] ERROR: Cannot connect to 127.0.0.1:3128
Antony Stone
Antony.Stone at squid.open.source.it
Tue Oct 11 10:56:23 UTC 2016
On Tuesday 11 October 2016 at 12:31:03, Jorgeley Junior wrote:
> I think it could be the sequence of the rules, do this command and post the
> results:
> grep . /etc/squid-your-version/squid.conf |
> grep -v "#"
This can be collapsed down to:
grep "^[^#]" /etc/squid-your-version/squid.conf
That regex matches any character other than # at the start of a line. Empty
lines don't count, because there is no character at the start of the line.
Antony.
> 2016-10-11 3:59 GMT-03:00 Amos Jeffries <squid3 at treenet.co.nz>:
> > On 11/10/2016 4:54 p.m., Михаил wrote:
> > > I check version of squid 3.5.21 with my configuration and I faced with
> > > a problem. Early I used in version 3.5.12 this line for connect
> > > localhost,
> >
> > but now
> >
> > > it doesn't work.
> >
> > Order is important. Where you place the rules in squid.conf matters a
> > lot with regards to whether they are actually useful and do what you
> > want, or not.
> >
> > > # squid.conf
> > > ...
> > > http_access allow localhost manager
> > > http_access deny manager
> > > ...
> > > # squidclient -p 3128 -h localhost mgr:info
> > > HTTP/1.1 403 Forbidden
> > > Server: squid
> > > Mime-Version: 1.0
> > > Date: Tue, 11 Oct 2016 03:42:54 GMT
> > > ...
> > >
> > > If I set a full access I could connect to localhost.
> > >
> > >
> > > # squid.conf
> > > ...
> > > http_access allow all
> > > http_access deny manager
> > > ...
> >
> > So what IP address(es) does 'localhost' resolve to?
> >
> > > # squidclient -p 3128 -h localhost mgr:info
> > > stub time| WARNING: BCP 177 violation. IPv6 transport forced OFF by
> > > build parameters.
> >
> > I know you said in a followup to ignore this. But it may be important.
> >
> > It shows that squidclient was built with --disable-ipv6, and yet your
> > system is IPv6-enabled.
> >
> > The name "localhost" for IPv6-enabled systems is ::1.
> >
> > A squid binary that is built with --disable-ipv6 will not permit ::1
> > since it is non-IP4. But it will be recognized as part of "all" IP space.
> >
> > > HTTP/1.1 200 OK
> > > Server: squid
> > > Mime-Version: 1.0
> > > Date: Tue, 11 Oct 2016 03:47:36 GMT
> > > ...
> > > What is happend? And what is the right way to connect to
> >
> > cache_management from
> >
> > > localhost?
> >
> > squidclient defaults to localhost and port 3128 for management access to
> >
> > Squid. Just use:
> > squidclient mgr:info
> >
> > Amos
> >
> > _______________________________________________
> > squid-users mailing list
> > squid-users at lists.squid-cache.org
> > http://lists.squid-cache.org/listinfo/squid-users
>
> --
--
There's no such thing as bad weather - only the wrong clothes.
- Billy Connolly
Please reply to the list;
please *don't* CC me.
More information about the squid-users
mailing list