Hi Marbot, you're not the only one who is using piwik with access authorisation! :)
I don't know if you're still trying to solve this problem, but the following worked for me:
# Restrict outside access
AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /path/to/user/.htpasswd/public_html/stats/.htpasswd
AuthName "name"
<Files "*">
Require valid-user
</Files>
# In order to run archive.php as a cron job:
<Files "*">
Order allow,deny
Allow from x.x.x.x #IP address of your server
Satisfy any
</Files>
# It's important to have this *after* the previous rule.
<Files ~ "^piwik\.(js|php)|robots\.txt$">
Allow from all
Satisfy any
</Files>
I've tried 127.0.0.1, and that didn't work. Then I've changed it to the actual IP address of the server, and now it works.
I don't know if you're still trying to solve this problem, but the following worked for me:
# Restrict outside access
AuthGroupFile /dev/null
AuthType Basic
AuthUserFile /path/to/user/.htpasswd/public_html/stats/.htpasswd
AuthName "name"
<Files "*">
Require valid-user
</Files>
# In order to run archive.php as a cron job:
<Files "*">
Order allow,deny
Allow from x.x.x.x #IP address of your server
Satisfy any
</Files>
# It's important to have this *after* the previous rule.
<Files ~ "^piwik\.(js|php)|robots\.txt$">
Allow from all
Satisfy any
</Files>
I've tried 127.0.0.1, and that didn't work. Then I've changed it to the actual IP address of the server, and now it works.