Question

Permission problem: Awstats

  • Posted November 5, 2014

Hi

I try to install Awstats and get it to work. i have follow this guide: http://blogging.dragon.org.uk/installing-awstats-on-ubuntu-14-04-lts/#comment-72

But i end up whit a 403 forbidden pages.

I dont know where the block is. Any suggestions?

Subscribe
Share

Hi

I have found this in the error log:

[Thu Nov 06 13:27:02.271407 2014] [cgi:error] [pid 18656] [client 213.112.113.134:51765] attempt to invoke directory as script: /usr/lib/cgi-bin/

Hi,

Are there any errors in apache’s error log?

sudo tail -40 /var/log/apache2/error.log

Yes no error.

Hi! Did all the commands succeed when you were going through the tutorial?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

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/

with

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

then restart Apache:

sudo service apache2 restart

Does that fix it?

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/

with

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

then restart Apache:

sudo service apache2 restart

Does that fix it?

This comment has been deleted