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. http://example.com/stats/
    shows 404 Not found


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


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



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


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

    Code
    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 127.0.0.1:80> 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] ScriptAlias /awstats "/usr/lib/cgi-bin/awstats.pl" <Directory /usr/lib/cgi-bin> Options +ExecCGI AllowOverride Limit DirectoryIndex awstats.pl Require all granted </Directory></VirtualHost>


    In the apropiate config file of the domain is the following section (e.g. example.com):


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


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


    Code
    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.

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

  • Hallo,


    I habe the same problem.


    I thing Awstats is not installed.


    Kind regards
    Viktor

    - Distribution: Debian | Release: 8.10 | Codename: jessie

    - i-MSCP Version: i-MSCP 1.5.3 | Build: 20180516 | Codename: Ennio Morricone

    - Plugins installed: ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), PanelRedirect (v 1.2.0) & SpamAssassin (v 2.0.1)

    - LetsEncrypt (v 3.6.0), PhpSwitcher (v 5.0.5), RoundcubePlugins (v 2.0.2)

  • @Viktor


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


    On jessie, I get:


    awstats_error_jessie.png



    which is not a 404 error.

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

  • 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.

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

  • 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.

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

  • Hallo,


    Quote

    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 awstats.pl


    Kind regards
    Viktor

    - Distribution: Debian | Release: 8.10 | Codename: jessie

    - i-MSCP Version: i-MSCP 1.5.3 | Build: 20180516 | Codename: Ennio Morricone

    - Plugins installed: ClamAV (v. 1.3.0), Mailgraph (v 1.1.1), OpenDKIM (v 2.0.0), PanelRedirect (v 1.2.0) & SpamAssassin (v 2.0.1)

    - LetsEncrypt (v 3.6.0), PhpSwitcher (v 5.0.5), RoundcubePlugins (v 2.0.2)

  • @yacsp @Viktor


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


    See

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


    Thank you for your report.

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