<div dir="ltr">Hello, Jonathan,<br><div><br></div><div><div>> curl <a href="http://localhost:3128/squid-internal-mgr/info" target="_blank">http://localhost:3128/squid-internal-mgr/info</a> </div><div><br></div><div>> Where would I place the password?</div></div><div><br></div><div>I use the following configuration:</div><div><font face="monospace">http_access allow localhost  manager<br></font></div><div><font face="monospace">cachemgr_passwd redacted config</font><br></div><div><br></div><div>The command to read the current running config is:</div><div><font face="monospace">curl localhost:3128/squid-internal-mgr/config -u :redacted</font><br></div><div><br></div><div><br></div><div>Kind regards,</div><div>      Ankor.</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">чт, 18 июл. 2024 г. в 17:07, Alex Rousskov <<a href="mailto:rousskov@measurement-factory.com">rousskov@measurement-factory.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2024-07-18 00:55, Jonathan Lee wrote:<br>
<br>
> curl <a href="http://localhost:3128/squid-internal-mgr/info" rel="noreferrer" target="_blank">http://localhost:3128/squid-internal-mgr/info</a> <br>
> <br>
> Where would I place the password?<br>
<br>
See "man curl" or online manual pages for curl. They will point you to <br>
two relevant options: --user and --proxy-user. AFAICT, your particular <br>
cache manager requests are sent _to_ the proxy (as if it were an origin <br>
server) rather than _through_ the proxy. Thus, you should use --user.<br>
<br>
As I keep saying on this thread, due to Squid complications related to <br>
Bug 5283, specifying seemingly correct client parameters may not be <br>
enough to convince Squid to accept the cache manager request. I <br>
recommend the following procedure:<br>
<br>
1. List the corresponding http_port directive first, before any other <br>
http_port, https_port, and ftp_port directives. Do not use interception <br>
of any kind for this cache manager port.<br>
<br>
2. Use curl with absolute squid-internal-mgr URLs with http scheme (like <br>
you show above). Do _not_ use "curl --proxy" or similar. Do not use <br>
https scheme.<br>
<br>
3. In that absolute mgr URL, use the host name that matches <br>
visible_hostname in squid.conf. If you do not have visible_hostname in <br>
squid.conf, add it. This is not required, but, due to Squid bugs, it is <br>
often much easier to get this to work with visible_hostname than without it.<br>
<br>
4. Make (passwordless) mgr:info use case working first, before trying to <br>
get password-protected pages working.<br>
<br>
5. When you do specify a username and a password, remember that you are <br>
sending this request to an (equivalent of) a service running on an <br>
origin server, _not_ a proxy (hence --user rather than --proxy-user).<br>
<br>
<br>
If you cannot figure it out despite carefully going through the above <br>
steps, share (privately if needed) a pointer to compressed ALL,9 <br>
cache.log while reproducing the problem with throw-away credentials on <br>
an idle Squid with a single curl request. Mention which step you got <br>
stuck on.<br>
<br>
<br>
HTH,<br>
<br>
Alex.<br>
<br>
_______________________________________________<br>
squid-users mailing list<br>
<a href="mailto:squid-users@lists.squid-cache.org" target="_blank">squid-users@lists.squid-cache.org</a><br>
<a href="https://lists.squid-cache.org/listinfo/squid-users" rel="noreferrer" target="_blank">https://lists.squid-cache.org/listinfo/squid-users</a><br>
</blockquote></div>