Answer the question
In order to leave comments, you need to log in
How to close LIGHTSQUID page in Apache2 webserver using .htaccess?
Installed Apache2 server, Squid proxy server and a set of CGI scripts aka lightsquid to display Squid usage statistics. The lightsqduid itself is hooked into Apache2 as a conf module (conf-available).
In apache2.conf:
< Directory /usr/share/lightsquid/>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
< /Directory>
< Directory /usr/lib/cgi-bin/lightsquid/>
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
< /Directory>
In the same directories is the .htaccess file:
Options FollowSymlinks ExecCGI
DirectoryIndex index.cgi
AuthType Basic
AuthName "STATISTIK"
AuthUserFile /usr/share/lightsquid/.htpasswd
Require valid-user
As a result, on 10.10.10.1/lightsquid, full statistics are opened, without any password.
PS Basic Auth module works - tested on Apache2 home page.
How to tie authorization by password?
Answer the question
In order to leave comments, you need to log in
It worked for me after changing in /etc/apache2/conf-enabled/lightsquid.conf:
Alias /lightsquid/ /usr/lib/cgi-bin/lightsquid/
Location "/lightsquid/">
AddHandler cgi-script .cgi
AuthType Basic
AuthName "Restricted Content"
AuthUserFile /usr/share/lightsquid/.htpasswd
Require valid-user
</Location>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question