The RewriteRule was wrong. Replace the /etc/apache2/sites-available/01_awstats.conf with this:
Code:
#
# AWStats Begin
#
Alias /awstatsicons "/usr/share/awstats/icon/"
NameVirtualHost 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^/stats/(.+)/$ http://localhost/awstats/?config=$1 [P]
RewriteRule ^/stats/(.+)/awstats.pl(.*)$ http://localhost/awstats/$1 [P]
RewriteRule ^/stats/(.*)$ http://localhost/stats/$1/ [R]
</IfModule>
ScriptAlias /awstats "/usr/lib/cgi-bin/awstats.pl"
<Directory /usr/lib/cgi-bin>
AllowOverride none
Options +ExecCGI
DirectoryIndex awstats.pl
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
#
# AWStats End
#