Permission problem: Awstats

Posted November 5, 2014 21.9k views


I try to install Awstats and get it to work. i have follow this guide:

But i end up whit a 403 forbidden pages.

I dont know where the block is. Any suggestions?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Edit /etc/apache2/sites-available/000-default.conf:

sudo nano /etc/apache2/sites-available/000-default.conf

and replace:

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
ScriptAlias /awstats/ /usr/lib/cgi-bin/


Alias /awstats /usr/lib/cgi-bin
<Directory /usr/lib/cgi-bin>
 AddHandler cgi-script cgi pl
 Options ExecCGI

then restart Apache:

sudo service apache2 restart

Does that fix it?

  • No it dont fix the problem.

    Now i have this error in the log:

    [Fri Nov 07 10:07:22.656954 2014] [autoindex:error] [pid 11915] [client] AH01276: Cannot serve directory /usr/lib/cgi-bin/: No matching DirectoryIndex (index.php,index.html,index.cgi,,index.xhtml,index.htm) found, and server-generated directory index forbidden by Options directive

    What can fix that?

  • Can you try browsing to http://ip or domain/awstats/ If that works, add the following line after Options ExecCGI:


    and restart Apache again.