how to setup awstats with LEMP
thanks
6 Replies
2. follow one of these
3. Generate a htpasswd file with````
htpasswd -c /path/to/.htpasswd username
4\. add the following to your nginx config file for awstats
location /path/to/awstats
{
authbasic "Restricted";
authbasicuserfile /path/to/.htpasswd;
}
````
5. restart nginx
That will add password protection to awstats.
As for security issues, that's what the password protection is for.
That way, I don't have to fight with passwords and such, I just "ssh -ND 9999 mysite.com" and I can access phpmyadmin/monit/awstats/etc, and nobody else can.
Of course, if you're trying to use awstats to serve content for other users, this becomes harder.
You can also try using a VPN and serving pages over that.