apache2 访问认证
创建密码
1
2
3
| htpasswd -c squid.pwd admin
chown www-data:www-data squid.pwd
|
修改 /etc/apache2/apache2.conf
1
2
3
4
5
6
| <Location /cgi-bin/cachemgr.cgi>
AuthType Basic
AuthName "admin"
AuthUserFile /etc/squid/squid.pwd
require valid-user
</Location>
|