miss cachemgr.cgi

Hello.... I already installed squid proxy squid-2.7.STABLE4.tar.gz via ports.... it' working well. but I want to attach cachemgr.cgi, I'm looking for that file in squid directory, but there's no cachemgr.cgi, anybody know how to find or just downloading that single file? How to solve missing cachemgr.cgi?

/usr/local/squid
/usr/local/etc/squid
only cachemgr.conf is in there....

Thank you.
 
You can find this info by reading the port's Makefile:
Code:
libexec=	[b]cachemgr.cgi[/b] digest_pw_auth diskd-daemon \
		ip_user_check logfile-daemon \
		msnt_auth ncsa_auth ntlm_auth \
		pam_auth smb_auth smb_auth.sh squid_db_auth squid_session \
		squid_unix_group wbinfo_group.pl

<snip>

CONFIGURE_ARGS=	--bindir=${PREFIX}/sbin  \
		--sbindir=${PREFIX}/sbin  \
		--datadir=${PREFIX}/etc/squid \
		[b]--libexecdir=${PREFIX}/libexec/squid[/b] \
		--localstatedir=/var/squid \
		--sysconfdir=${PREFIX}/etc/squid \
		--enable-removal-policies="lru heap" \
		--disable-linux-netfilter \
		--disable-linux-tproxy \
		--disable-epoll

$PREFIX is normally /usr/local/.
 
I got a new problem....

Appears like this,

Code:
Cache Manager Error

connect: (61) Connection refused
Generated Thu, 21 Jan 2010 00:23:39 GMT, by cachemgr.cgi/2.7.STABLE4@creative
Code:
http_port 192.168.7.2:8080 transparent
dead_peer_timeout 30 seconds
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_replacement_policy heap LFUDA
memory_replacement_policy heap GDSF
cache_mem 512 MB
cache_swap_low 90
cache_swap_high 92
maximum_object_size 131072 KB
minimum_object_size 0 KB
maximum_object_size_in_memory 512 KB
ipcache_size 3000
ipcache_low 90
ipcache_high 95
fqdncache_size 8192
memory_pools off
cache_dir diskd /usr/cache1 28000 65 256 Q1=72 Q2=64
cache_dir diskd /usr/cache2 28000 65 256 Q1=72 Q2=64
cache_dir diskd /usr/cache3 28000 65 256 Q1=72 Q2=64
cache_dir diskd /usr/cache4 28000 65 256 Q1=72 Q2=64
cache_dir diskd /usr/cache5 28000 65 256 Q1=72 Q2=64
buffered_logs on
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
cache_store_log /var/log//squid/store.log
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
httpd_suppress_version_string on
allow_underscore on
collapsed_forwarding off
refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)$ 10080 95% 43200 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-private
refresh_pattern -i \.(html|htm|css|js)$ 1440 75% 40320
refresh_pattern -i \.index.(html|htm)$ 0 75% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern -i \.(class|css|js|tif)(\?.*)?$ 1440 95% 100000080 reload-into-ims override-lastmod
refresh_pattern -i \.(jpe|jpg|jpeg|png|bmp|gif)(\?.*)?$ 0 95% 1000000080 reload-into-ims override-lastmod
refresh_pattern -i \.(asp|acgi|pl|shtml|php3|php)(\?.*)?$ 2 20% 432000 reload-into-ims override-lastmod
refresh_pattern -i \.(ini)(\?.*)?$ 2 5% 10800 reload-into-ims override-lastmod
refresh_pattern ^http://*.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.static.ak.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://*.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://apps.facebook.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://facebook.poker.zynga.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://statics.poker.static.zynga.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache 
ignore-auth
refresh_pattern ^http://profile.ak.fbcdn.net/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://static-facebook.farmville.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache 
ignore-auth
refresh_pattern ^http://static.farmville.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^http://zbar.static.zynga.com/.* 720 100% 10080 override-expire override-lastmod reload-into-ims ignore-no-cache ignore-auth
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Package(.gz)*)$ 0 20% 2880
refresh_pattern . 0 20% 4320
client_lifetime 1 day
connect_timeout 1 minutes
peer_connect_timeout 30 second
read_timeout 15 minutes
request_timeout 5 minutes
persistent_request_timeout 2 minute
pconn_timeout 120 seconds
shutdown_lifetime 30 seconds
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 444 563 5000
acl Safe_ports port 22          # SSH
acl Safe_ports port 80          # http
acl Safe_ports port 21          # ftp
acl Safe_ports port 443 444 563 # https, snews
acl Safe_ports port 70          # gopher
acl Safe_ports port 210         # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280         # http-mgmt
acl Safe_ports port 488         # gss-http
acl Safe_ports port 591         # filemaker
acl Safe_ports port 777         # multiling http
acl Safe_ports port 2083        # cpanel
acl Safe_ports port 6660-6666   # mirc
acl Safe_ports port 5050        # yahoo gaim
acl Safe_ports port 1863        # MSN
acl Safe_ports port 25          # smtp
acl Safe_ports port 110         # pop3
acl Safe_ports port 119         # nntp
acl Safe_ports port 161         # snmp
acl Safe_ports port 143         # imap
acl Safe_ports port 995         # POP3 Gmail
acl Safe_ports port 465         # SMTP Gmail
acl Safe_ports port 587         # SMTP2 Gmail
acl Safe_ports port 993         # IMAP Gmail
acl Safe_ports port 20          # FTP
acl Safe_ports port 53          # Port Domain
acl CONNECT method CONNECT

acl numeric_IPs url_regex ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+
# ------------------- ACL KAryawan ----------------------- #
acl orang1 src 192.168.1.0/24
acl orang2 src 192.168.2.0/30
acl orang3 src 192.168.7.0/30
acl orang4 src 192.168.4.0/24
acl orang5 src 10.60.10.0/24
acl cachemgr proto cache_object
http_access deny CONNECT numeric_IPs all
http_access allow orang1
http_access allow orang2
http_access allow orang3
http_access allow orang4
http_access allow orang5
http_access allow cachemgr localhost
http_access allow cachemgr orang1
http_access allow cachemgr orang3
http_access deny cachemgr all
http_access allow !Safe_ports
http_access deny CONNECT !SSL_ports
http_reply_access allow all
icp_access deny all
reply_body_max_size 0 allow all
cache_mgr [removed]
cachemgr_passwd root info stats/object
cachemgr_passwd [removed] all
cache_effective_user squid
cache_effective_group squid
visible_hostname proxy.creative.net
http_access deny all
half_closed_clients off
shutdown_lifetime 10 seconds
cache_mgr ADMINISTRATOR


is it because of wrong port ?

thanks
 
I removed username and password from your file. Probably never a good idea to post those on forums..
 
ok, but its just fake password :) so its doesnt matter... so how to solve that problem ? do you have some advice ? thank you
 
I haven't used cachemgr for years, but some things that may be relevant: you probably shouldn't use the name of a directive ('cachemgr') for other things. The default squid.conf uses 'manager':

Code:
# Only allow cachemgr access from localhost
http_access allow [FILE][B]manager[/B][/FILE] localhost
http_access deny [B][FILE]manager[/FILE][/B]

Furthermore:
Code:
cachemgr_passwd root info stats/object
should be
Code:
cachemgr_passwd root info stats/object[B]s[/B]
I believe (squid -k parse should find errors).

You don't post the command used to connect to the cache manager. Are you connecting to the right IP from the right IP? It looks like there's nothing even listening on the IP you're connecting to. The cachemgr.conf may need work too.

Also check your log files like access.log and possibly cache.log for errors.

If this provides no clues, better try the Squid forums. There's nothing FreeBSD-related in here, really, it's just configuring Squid correctly.
 
still got an error :( i have following your intruction... but still doesnt work...

Code:
Cache Manager Error
connect: (61) Connection refused
Generated Thu, 21 Jan 2010 04:50:54 GMT, by cachemgr.cgi/2.7.STABLE4@creative
i'm wondering code 61 from that error, whats that mean ?

that's strange... acctually i didnt get any error when trying to parse it.. and my squid proxy working so good, my machine work just for webcache machine... not for nat... nat,firewall,management,etc use another machine...

here's sample access.log
Code:
1264049846.592     35 192.168.1.2 TCP_HIT/200 17308 GET http://www.kompas.com/favicon64.ico - NONE/- text/plain
1264049846.651     77 192.168.1.2 TCP_MISS/200 2160 GET http://stat.k.kidsklik.com/css_kompasads.php? - DIRECT/202.146.4.2 text/css
1264049846.681   1122 192.168.1.4 TCP_MISS/404 208 GET http://profile.ak.fbcdn.net/hprofile-ak-sf2p/hs258.snc3/23217_100000423120820_4175_q.jpg - DIRECT/58.27.22.9 text/plain
1264049846.718    148 192.168.1.2 TCP_MISS/200 9062 GET http://stat.k.kidsklik.com/css_kompas2011.php? - DIRECT/202.146.4.2 text/css
1264049846.890     38 192.168.1.2 TCP_HIT/200 3924 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/menu_kanal_baru.jpg - NONE/- image/jpeg
1264049846.909    558 192.168.1.4 TCP_MISS/404 208 GET http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs167.ash2/41499_100000010624521_5828_q.jpg - DIRECT/125.252.225.72 text/plain
1264049846.933     42 192.168.1.2 TCP_HIT/200 608 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/panah_turun.gif - NONE/- image/gif
1264049846.993     77 192.168.1.2 TCP_HIT/200 11028 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/logo_kompas.png - NONE/- image/png
1264049847.022     89 192.168.1.2 TCP_HIT/200 34435 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/bg_master2.jpg - NONE/- image/jpeg
1264049847.107     52 192.168.1.2 TCP_HIT/200 502 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/bullet_3b.gif - NONE/- image/gif
1264049847.160    110 192.168.1.2 TCP_HIT/200 39278 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/bg_master.gif - NONE/- image/gif
1264049847.197     40 192.168.1.2 TCP_HIT/200 768 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/bg_submenu.jpg - NONE/- image/jpeg
1264049847.425    109 192.168.1.2 TCP_MISS/200 1219 GET http://ads3.kompasads.com/new/www/delivery/ajs.php? - DIRECT/202.146.4.64 text/javascript
1264049847.508     34 192.168.1.2 TCP_HIT/200 1157 GET http://stat.k.kidsklik.com/data/2k10/kompascom2011/images/bg_konten_biru.jpg - NONE/- image/jpeg
1264049847.532     66 192.168.1.2 TCP_MISS/200 526 GET http://ads3.kompasads.com/new/www/delivery/lg.php? - DIRECT/202.146.4.64 image/gif
1264049847.564     81 192.168.1.2 TCP_MISS/200 20165 GET http://stat.k.kidsklik.com/data/photo/2011/01/21/1257193p.jpg - DIRECT/202.146.4.2 image/jpeg
1264049848.138   2594 192.168.1.4 TCP_MISS/404 208 GET http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs642.snc3/27372_100000385812368_4698_q.jpg - DIRECT/58.27.22.66 text/plain
1264049848.273   3553 192.168.1.65 TCP_MISS/200 865 GET http://www.facebook.com/ajax/presence/reconnect.php? - DIRECT/69.63.189.31 application/x-javascript
1264049848.323   3603 192.168.1.65 TCP_MISS/200 2282 GET http://www.facebook.com/ajax/chat/history.php? - DIRECT/69.63.189.31 application/x-javascript
1264049848.441   1692 192.168.1.4 TCP_MISS/404 208 GET http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs343.snc4/41422_100000725937791_9887_q.jpg - DIRECT/58.27.22.9 text/plain
1264049848.601    266 192.168.1.65 TCP_MISS/200 253 GET http://1.148.channel.facebook.com/x/1196431912/1389870893/false/p_100001001563954=71 - DIRECT/66.220.151.80 text/plain
1264049848.799   1387 192.168.1.65 TCP_MISS/200 1786 GET http://www.facebook.com/ajax/chat/history.php? - DIRECT/69.63.189.31 application/x-javascript
1264049848.937 260540 192.168.1.4 TCP_MISS/502 1500 GET http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs1346.snc4/161656_1168546353_3563222_q.jpg - DIRECT/125.252.225.9 text/html
1264049849.058   2080 192.168.1.2 TCP_MISS/200 2287 GET http://ads4.kompasads.com/new2/www/delivery/afr.php? - DIRECT/202.146.4.210 text/html
1264049849.106   2017 192.168.1.2 TCP_MISS/200 955 GET http://ads4.kompasads.com/new2/www/delivery/afr.php? - DIRECT/202.146.4.210 text/html
1264049849.199     62 192.168.1.2 TCP_HIT/200 7054 GET http://ads4.kompasads.com/new2/www/delivery/fl.js - NONE/- application/x-javascript
1264049849.315     42 192.168.1.2 TCP_HIT/200 1137 GET http://img.ads.kompas.com/ads6/1x1.gif - NONE/- image/gif
1264049849.374    549 192.168.1.4 TCP_MISS/200 753 GET http://facebook2.poker.zynga.com/poker/xd_receiver.htm? - DIRECT/74.114.14.200 text/html
1264049849.423    465 192.168.1.4 TCP_MISS/404 208 GET http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs645.snc3/27433_100000449231596_9600_q.jpg - DIRECT/125.252.225.72 text/plain
1264049849.547   1252 192.168.1.65 TCP_MISS/200 2282 GET http://www.facebook.com/ajax/chat/history.php? - DIRECT/69.63.189.31 application/x-javascript
1264049849.621   1328 192.168.1.65 TCP_MISS/200 863 GET http://www.facebook.com/ajax/presence/reconnect.php? - DIRECT/69.63.189.31 application/x-javascript
 
Finally I can solve it. It's easy. Edit the cachemgr.conf change localhost to the ip and port of the proxy :) thanks DutchDaemon.
 
not found cachemgr.cgi

I installed Squid-2.7 stable3 on FreeBSD, Squid downloaded from http://www.squid-cache.org/ and I want to configure cachemgr for monitoring Squid, but I didn't find cachemgr.cgi in /usr/local/etc/squid/libexec/cachemgr.cgi. How do I resolve it?

Thanks
Best Regards
#Elman
 
It's supposed to be in /usr/local/libexec/squid/cachemgr.cgi, which should have been clear from the second post in this topic. The way you describe the installation seems to suggest that you did not install it using the ports system or a FreeBSD package. You really should use the ports/package system.

www/squid
www/squid30
www/squid31
 
Back
Top