Error 404 on WebStatistics on Ubuntu 16.04

  • Distro: Ubuntu 16.04
    I-MSCP: v1.3.0 (fresh installed on plain Ubuntu)

    Problem: Error 404 after click on Webstatistics in Panel.

    The username and password ist asked before, after then the url, e.g.
    shows 404 Not found

    The log /var/log/apache2/error.log shows:

    1. [Wed Jul 13 13:52:14.565024 2016] [cgid:error] [pid 8563:tid 140349766842112] [client] AH01264: script not found or unable to stat: /usr/lib/cgi-bin/

    and a look at /usr/lib/cgi-bin/ shows, that there is no

    Im sure, that i choose the installation of awstats during setup. Under /etc/apache2/sites-enabled is a @01_awstats.conf with following content:

    1. <Proxy *> Require all granted</Proxy>Alias /awstatsicons "/usr/share/awstats/icon/"<Directory "/usr/share/awstats/icon/"> Options None AllowOverride None Require all granted</Directory><VirtualHost> RewriteEngine on RewriteRule ^/stats/(.+)/$ http://localhost/awstats/?config=$1 [P] RewriteRule ^/stats/(.+)/*)$ http://localhost/awstats/$1 [P] RewriteRule ^/stats/(.*)$ http://localhost/stats/$1/ [R] ScriptAlias /awstats "/usr/lib/cgi-bin/" <Directory /usr/lib/cgi-bin> Options +ExecCGI AllowOverride Limit DirectoryIndex Require all granted </Directory></VirtualHost>

    In the apropiate config file of the domain is the following section (e.g.

    1. <Location /stats> RewriteEngine on RewriteRule ^(.+)?config=([^?&]+)(.*) $1?$3 [NC,L] AuthType Basic AuthName "Statistics for domain" AuthUserFile /var/www/virtual/ AuthGroupFile /var/www/virtual/ Require group statistics</Location>

    So, it seems, that awstats is not installed during setup.

    1. dpkg -l | grep awstats

    It gives no results.

    What goes wrong and how can i force a setup for awstats for i-mscp if i install the package manually?

  • @yacsp

    We will investigate.


  • @Viktor

    What error did you get exactly? Please give us more info... Assumptions is not relevant for us.

    On jessie, I get:


    which is not a 404 error.


  • Bug found. There is a bug in the Awstats package (call of the preaddDmn() API method while we should call the addDmn() API method). The result is that awstats conffiles are not created for the domains. Will be fixed in version 1.3.1.

    About Ubuntu Xenial (package not installed), I'll check now.


  • I'm not sure, if follwing helps:

    A look at all distro .xml in ../docs/Ubuntu and ../docs/Debian shows, that in the section "other" is no <package>awstats</package>

    A look in an older i-MSCP version .xml shows, that there is a <other>awstats</other>.

    So maybe it is just dropped or should be installed in other way, like in dependencies of a other package!?

  • badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @yacsp

    Bug confirmed for Ubuntu Xenial. I'll fix.


  • Hallo,


    Not Found
    The requested URL /awstats/ was not found on this server.
    Additionally, a 404 Not Founderror was encountered while trying to use an ErrorDocument to handle the request.

    Apache/2.4.10 (Debian) Server at localhost Port 80

    This is my error.

    A look at /usr/lib/cgi-bin/ shows, that there is no

    Kind regards

  • @yacsp @Viktor

    A fix has been added in the 1.3.x branch.


    This fix will be part of version 1.3.1 which will be released soon.

    Thank you for your report.