Since our server migration AWStats has not worked though the backups were configured to include them and the restore process was selected to restore them
Edit Virtual Server > Enabled Features > Enable AWStats Reporting? is not checked. Selecting it and saving the change results in:
Failed to modify server : AWstats reporting is already enabled for this domain
If I go over to Webmin > Servers > AWStats Reporting all my servers are listed but they are showing the same exact log file of /var/log/apache2/access.log instead of /var/log/virtualmin/domain.tld_access_log (with one exception which stats does work on). The permissions are also incorrect trying to run as root.
Changing a server to have the correct log file and correct permissions, when I try to view the log report I get this error
Error: SiteDomain parameter not defined in your config/domain file. You must edit it for using this version of AWStats.
Setup ('/etc/awstats/awstats.domain.tld.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
I have even tried deleting the log file for reporting within Webmin > Servers > AWstats Reporting > domain > delete and then tried enabling AWstats reporting through Virtualmin > Edit Virtual Server > Enabled Features > Enable AWStats Reporting?. This time Virtualmin goes through the procedure of updating the domain. As soon as it hits the AWstats config it fails with this:
Setting up AWstats reporting ..
.. AWstats reporting failed! :
Now, though, Virtualmin shows AWstats is enabled but it still fails with the permissions error. Trying to disable it and re-enable it makes no change - same errors.
Comments
Submitted by JamieCameron on Thu, 11/17/2011 - 14:38 Comment #1
It sounds like the original error about AWstats already being enabled is due to the file
/etc/awstats/domainname.com.conf
already existing. I'd suggest moving those files to another directory, and then re-trying enabling AWstats for your domains ...Submitted by clwheatley on Tue, 11/29/2011 - 12:47 Comment #2
Jamie,
I copied all the conf files from /etc/awstats and tried to enable Awstats for a domain. It failed with the following below though Edit Virtual Server > Enabled Features shows it is enabled
Setting up AWstats reporting ..
.. template AWstats configuration file was not found
If I go to Logs and Reports > AWstats Configuration or View Awstats Report I get:
Failed to open /etc/awstats/awstats.domain.tld.conf : No such file or directory
Submitted by JamieCameron on Tue, 11/29/2011 - 15:39 Comment #3
You shouldn't remove the awstats.model.conf or awstats.conf file, as those are the templates Virtualmin copies to create the config for a new domain..
Submitted by clwheatley on Tue, 11/29/2011 - 16:15 Comment #4
I copied awstats.conf back to /etc/awstats. However, there is no awstats.model.conf. No files were deleted, only moved.
Submitted by JamieCameron on Tue, 11/29/2011 - 17:54 Comment #5
That's OK, you only need one of those two files..
Submitted by clwheatley on Tue, 11/29/2011 - 19:07 Comment #6
Ok, I was able to enable AWstats without error but when going to Logs and Reports > View AWstats Report I get this:
Error: Could not open include file: /etc/awstats/awstats.conf.local
Setup ('/etc/awstats/awstats.domain.tld.conf' file, web server or permissions) may be wrong.
Check config file, permissions and AWStats documentation (in 'docs' directory).
Submitted by clwheatley on Tue, 11/29/2011 - 19:07 Comment #7
What should the permissions be on those files? And why would it fail to create the proper permissions to a conf Virtualmin created for that domain?
Submitted by JamieCameron on Tue, 11/29/2011 - 23:46 Comment #8
Looks like the real issue is that /etc/awstats/awstats.conf.local is missing. If you renamed it elsewhere, you should put it back ..
Submitted by clwheatley on Wed, 11/30/2011 - 11:54 Comment #9
Great, that worked! Thanks Jamie
Submitted by JamieCameron on Wed, 11/30/2011 - 15:32 Comment #10
Submitted by Issues on Wed, 12/14/2011 - 15:46 Comment #11
Automatically closed -- issue fixed for 2 weeks with no activity.