View Full Version : awstats can't access log files
basshead
10-16-03, 07:26 PM
Hi Everyone. I just installed Awstats. I've been able to access it directly using mydomain.com/cgi-bin/awstats.pl. Additionally I've activated enable update from web with "AllowToUpdateStatsFromBrowser=1".
My problem is, when I click on the "update now" link, I get the following error:
"Error: Couldn't open server log file "="/www/u/username/logs/access_log.1" : No such file or directory
Setup ('awstats.mydomain.com.conf' file, web server or permissions) may be wrong.
See AWStats documentation in 'docs' directory for informations on how to setup awstats. "
However, I do have the specified file. Any ideas?
Additionally, I have noticed a few fussy details about installing awstats. It's all stuff I've seen people on this forum say you might need. Well, I needed them:
1. set awstats.pl CMOD to 755
2. use awstats.www.mydomain.com.conf for www.mydomain.com/cgi-bin/awstats.pl and awstats.mydomain.com.conf for mydomain.com/cgi-bin/awstats.pl.
Otherwise the tutorial worked great.
thanks for everyone's help
-matt
In your config file:
These lines must be
LogFile="/www/u/username/logs/access_log.1"
SiteDomain="yourdomain.com" (no "www")
Some users can not get Awstats to function unless the config file is named
awstats.www.yourdomain.com.conf
FTP in and check to make sure that your logs folder does contain the "access_log.1" file.
basshead
10-17-03, 10:16 AM
well, I do have:
LogFile="/www/u/username/logs/access_log.1"
SiteDomain="yourdomain.com" (no "www")
and the "access_log.1 file does exist.
Perhaps I should try a relative path for the log file.
any other ideas?
-matt
Matt,
Did you also CHMOD "awstats.yourdomain.com.conf" to 755?
basshead
10-17-03, 05:21 PM
well, I did try CHMOD that file to 755. And nothing happened.
Though I would not expect that to be the problem since "awstats.yourdomain.com.conf" is only being read. Also, I know that the file isconfig file is being read since the error includes:
Error: Couldn't open server log file "="/www/u/username/logs/access_log.1" : No such file or directory
the server log file is specified in the config file. seems to me that Awstats is finding the config alright, but the server is not granting permission to the process to see the appropriate log file. I've also tried using the relative path:
"../logs/access_log.1"
I've also tried using the access_log and access_log.2 files. No luck that way either.
any more ideas?
thanks
-matt
Originally posted by basshead
Error: Couldn't open server log file "="/www/u/username/logs/access_log.1" : No such file or directory
Check again to see how you have the path to the access log in the conf file. Looking at the above error, it looks as if you have a quote before the =, which shouldn't be there.
basshead
10-18-03, 01:41 AM
gee I feel stupid. A typo got me.
I was able to call it from the cgi-bin directory directly. My cron jobs seem to be working so in an hour or so, I should see it work.
thanks
-matt
:D
mjcolonas
11-5-03, 10:44 PM
This is the error that I am getting - very similar. I checked everything listed above and still it comes up with this - any ideas?
Error: Couldn't open server log file "/www/m/mcolonas/logs/access_log.1" : No such file or directory
Setup ('awstats.www.thefloridamortgagecompany.com.conf' file, web server or permissions) may be wrong.
See AWStats documentation in 'docs' directory for informations on how to setup awstats.
Any ideas?
basshead
11-5-03, 10:56 PM
I would try the CHMOD thing on your files. Also, in your cron file, if you use "www" in your path to the pearl script, you need to use a config file with www in the name. If you don't use www in the path, don't use ww in the conf file name. note that this will cause 2 different web pages:
www.domain.com/cgi-bin/awstats.pl and domain.com/cgi-bin/awstats.pl
I use both config file names, that way I can use eithe rweb page.
-good luck
-matt
mjcolonas
11-5-03, 11:32 PM
I tried the CHMOD 755 to the files - to no avail. You mention a perl script - where I am suppose to have this and what is it suppose to say? Where should it be located?
Thanks.
basshead
11-6-03, 07:51 PM
you can run awstats 2 ways. One way is my updating manually through the web page if you set it to allow this in the configuration file. Otherwiase, you use a cronjob to update the statistics. my cron job look slike this:
0 */4 * * * /www/u/user/cgi-bin/awstats.pl -config=mydomain.com -update
when you go to look at your awstats page, you point your browser to mydomain.com/cgi-bin/awstats.pl (assuming this where you put the pearl script)
to do this, you need to have a mydomain.com.conf file.
if you use "www.mydomain.com" instead of "mydomain.com", you need to use a www.maydomain.com.conf file.
awstats.pl IS the peral script. I have mine in cgi-bin/ folder. The conf files should be in the same place.
hope this helps.
-matt
mjcolonas
11-6-03, 09:57 PM
I duplicated everything you did in your crontab file. I don't quite understand though what the /4 between the hours and days does though??
I do have mydomain.com as www.mydomain.com.conf which is way it is throughout my ***.conf file and my crontab.
My problem now is that when I was working on it last night and finally got it to come up - I didn't get an update.
Today I couldn't get an update from it. Even webalizer missed updating the files from the 5th (yesterday). Did I accidentally delete something? Does this work off the webalizer info or the server info? If the servo, then why don't I have any info for yesterday and today, when there is info for the 4th on the Awstats????
Help!!
basshead
11-7-03, 12:02 PM
1: the "/4" says to run this 4 times a day. This way you can get updated values throughout the day. Try a Google search on cron jobs if you want to know more about cron sysntax.
2: So now you can see the web page. but you didn't get data. Well, I would start my enabling "allow update from web" in the conf file. This will add a link at the top of the page which will let you run an update manually. Just click the link. The stats should update.
Your update info may be becuase of 2 things. One is, you have the cron file but it did not run. I found that if it waw uploaded as a bin file it would not work but uploading it as a ascii file it worked. If you are using dreamweaver, it will upload as an bin file. Read the forum on how to upload it as an ascii file. Basically, add ".txt to the end, upload it then edit the file name on the server. You can also find some info on how to test your cron file on the forums. The other is you might not be pointing to the right location for your data file in your conf file. make sure this is correct in your conf file. I use:
LogFile="/www/x/xxxxxxxx/logs/access_log.1"
3: perhaps the 4th was skipped. Sometimes the server has a hiccup.
good luck
Englesos
11-16-03, 08:03 AM
When I looked into the Logs directory I didn't have a access_log.1 file, only an access_log. I pointed the script at than and on manual update it seems to work.
Can anyone tell me if this will report hits efficiently or does it just look good?
Lets see what the chron jobs make of it.
Why do I have to sweat this **** when supposedly Powweb are supplying me with webstats?
access_log is the current log file. Once a day, it gets rolled over to access_log.1, the previous .1 gets renamed .2, etc. The previous week's worth of log files are put in a ZIP file.
If you point awstats at access_log, you'll miss hits that came in between the last time you updated and the rollover.
If your log files are not rolling over automatically, contact support and complain.
Englesos
11-16-03, 01:41 PM
Hi Steve,
I'm obliged for the information and have sent an e-mail on the topic to support@powweb.com.
Lets hope they will read it.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.