missing AWstats file

12 posts / 0 new
Last post
#1 Wed, 10/04/2017 - 15:19
Araytha

missing AWstats file

Hi,

I've been trying to fix an issue ive had with installing AWstats, after a forced fresh VPS & Virtualmin Install I am unable to get it running again (it was so simple the first time!)

When trying to access 'AWstats Report' for any give Virtual Server I get the error

"Failed to open /etc/awstats/awstats.DOMAIN.TLD.conf : No such file or directory"

I'm unsure how to create these files or force Virtualmin to make them, I've check the settings for the virtual servers and AWstats is checked,

Under Webmin > Server > AWstats Reporting it says "No domains have been set up for AWstats reporting yet." I'm unsure if I have to add a logfile into it and if I do what I should put

Operating system Debian Linux 8 Webmin version 1.853 Usermin version 1.720 Virtualmin version 6.01

Any help is greatly appreciated

Wed, 10/04/2017 - 16:03
Joe
Joe's picture

Did you use the --minimal installation mode when you installed Virtualmin? That skips installation of AWstats, so something might still be unconfigured.

You can try disabling AWstats for the domain and then re-enabling it. That should regenerate the configuration file.

--

Check out the forum guidelines!

Wed, 10/04/2017 - 16:25 (Reply to #2)
Araytha

Thank you very much Joe! Disabling and re-enabling worked a treat. Just for reference I used these commands on the VPS to install Virtualmin

"wget http://software.virtualmin.com/gpl/scripts/install.sh -O /root/virtualmin-install.sh"

Then

"sh /root/virtualmin-install.sh"

I'm not sure is this does a --minimal install

Wed, 10/04/2017 - 16:38 (Reply to #3)
Joe
Joe's picture

No, you're fine. That's a full installation. install.sh defaults to a full installation with Apache (there are other options for a smaller set of packages, called --minimal and installations with nginx instead of Apache called --bundle LEMP, but we recommend the default for most users).

--

Check out the forum guidelines!

Wed, 10/04/2017 - 17:04 (Reply to #4)
Araytha

Fantastic, that's great to know. Thank you again for the fast assistance, I'm not sure if I need to or how to close the thread as solved :)

Wed, 10/04/2017 - 18:22 (Reply to #5)
Araytha

Why trying to use AWstats Logfile Analyzer, I get this error

The logfile analysis command /usr/local/awstats/wwwroot/cgi-bin/awstats.pl was not found on your system.

Any ideas?

Wed, 10/04/2017 - 18:48 (Reply to #6)
Araytha

Managed a quick fix by copying AWstats.pl from a virtual server to this location.. then I got an error that etc/AWstats/AWstats.model.conf was missing so I duplicated AWstats.conf and renamed it, this fixed it and it's now working.

Not sure how brutal of a fix this is though...

Wed, 10/04/2017 - 20:01 (Reply to #7)
Joe
Joe's picture

That's a configuration problem. I have no idea how the configuration would point to /usr/local, unless your OS has been misdetected by Webmin. /usr/local is in the "fallback" configuration for when Webmin has no idea how to support the OS it is running on, which would be a pretty bad thing to happen...you'd end up with incorrect config files all over the place.

Have there been any other configuration mishaps like this?

You should never move files around like that, you should correct the configuration. You can copy /usr/share/virtualmin-awstats/config-debian-linux to /etc/webmin/virtualmin-awstats/config and restart Webmin.

--

Check out the forum guidelines!

Thu, 10/05/2017 - 01:46 (Reply to #8)
Araytha

I have had no other issues with this installation, only issues with AWstats.

I will move them both back. Where abouts is AWstats.pl normally located?

Thu, 10/05/2017 - 03:00 (Reply to #9)
Araytha

I have discovered i don't have the folder "/usr/share/virtualmin-awstats/"

I was able to find the file "/etc/webmin/virtualmin-awstats/config" This folder also contains "awstats.pl" I assume I am to change the AWstats Logfile Analyzer confif to this location for awstats.pl and awstats.model.config to the file "config"

EDIT: This resulted in an error..

Failed to get the version of AWStats. Command /etc/webmin/virtualmin-awstats/awstats.pl returned :

Use of uninitialized value $ARGV[0] in string eq at /usr/share/webmin/virtualmin-awstats/awstats.pl line 12. Use of uninitialized value $ARGV[0] in string eq at /usr/share/webmin/virtualmin-awstats/awstats.pl line 17. usage: awstats.pl [--debug] [--output dir] at /usr/share/webmin/virtualmin-awstats/awstats.pl line 23.

. May be your module configuration is incorrect.

Thu, 10/05/2017 - 04:00 (Reply to #10)
Joe
Joe's picture

No, you're mixing up how all these pieces fit together.

That original path I gave should have been /usr/share/webmin/virtualmin-awstats/config-debian-linux. That needs to replace the file in /etc/webmin/virtualmin-awstats/config. Nothing else changes!

The files I'm telling you to move around are Webmin config files. The files you're moving around are AWstats config files, which is not necessary and can't work. Don't put awstats files into the Webmin configuration directory. All we're doing here is telling Webmin where to find AWstats.

--

Check out the forum guidelines!

Thu, 10/05/2017 - 04:43 (Reply to #11)
Araytha

That seems to have it running, thank you again and sorry that it was so hard to get the point to me. I was editing the Module Config in webmin.

I should delete the awstats.pl that I moved and the awstats.model.conf that I created at the start of all this?

Topic locked