View previous topic :: View next topic |
Author |
Message |
Mousee Apprentice
Joined: 29 Mar 2004 Posts: 291 Location: Illinois, USA
|
Posted: Sat Dec 09, 2006 7:29 pm Post subject: |
|
|
infecticide wrote: | I'm getting these errors when trying to update the database:
Code: |
/usr/share/webapps/awstats/6.5-r1/hostroot/cgi-bin/awstats.pl -config=vhost.domain.net -update
Error Opening file /pathto/GeoIPRegion.dat
Error Opening file /pathto/GeoIPCity.dat
Update for config "/etc/awstats/awstats.vhost.domain.net.conf"
With data in log file "/var/log/apache2/vhost.domain.net-access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Can't call method "city" on an undefined value at /usr/share/webapps/awstats/6.5-r1/hostroot/cgi-bin/plugins/geoip_city_maxmind.pm line 4533, <LOG> line 2.
|
Little help? |
It appears you have the GeoIP module enabled from these errors. However there are 2 GeoIP modules.. the GeoIPFree and GeoIP (Pay) modules. If you're trying to use the standard GeoIP (Pay) module, then you need to actual buy it. If you're trying to use the GeoIP:Free module, then you might need to install it first. It's a Perl module I believe... I haven't touched GeoIP in a while so I don't honestly recall, but a quick forum search here might turn up some hints
You could alternately just disable GeoIP.. unless you really need such data. |
|
Back to top |
|
|
infecticide Apprentice
Joined: 10 Mar 2004 Posts: 262 Location: Regina, SK Canada
|
Posted: Sat Dec 09, 2006 7:32 pm Post subject: |
|
|
It almost appears as though its expecting the path the GeoIP database to be defined somewhere.
Any idea where I would do that? |
|
Back to top |
|
|
Mousee Apprentice
Joined: 29 Mar 2004 Posts: 291 Location: Illinois, USA
|
Posted: Sat Dec 09, 2006 8:24 pm Post subject: |
|
|
infecticide wrote: | It almost appears as though its expecting the path the GeoIP database to be defined somewhere.
Any idea where I would do that? |
Like I said, it depends on which version of GeoIP you're trying to use.
All of the settings are in your awstats config file though.
Just as an example:
Quote: |
# Plugin: GeoIP_Org_Maxmind
# Perl modules required: Geo::IP (from Maxmind)
# Note: This plugin need Maxmind GeoIP Perl module AND the Org database.
# Note: I get some problem with Maxmind Geo::IP Perl module with ActiveState
#LoadPlugin="geoip_org_maxmind GEOIP_STANDARD /pathto/GeoIPOrg.dat"
|
The GeoIP options are near the bottom of your config file.
If you're trying to use Geo::IPFree and are getting this same error, then I'm sorry but I have no idea. The only thing I can think of in this case, is that you don't have the Geo::IPFree Perl module installed. |
|
Back to top |
|
|
Sakkath Apprentice
Joined: 06 Nov 2005 Posts: 198 Location: Pawtucket, RI
|
Posted: Mon Jan 22, 2007 5:15 pm Post subject: |
|
|
Thank you for the HOWTO. All the other ones I found, including on gentoo-wiki, were no good, they just took unnecessary steps and lead to unwanted results. You should just change a few numbers to make it work with the newest version and put it on gentoo-wiki.com :-p. Having it on the gentoo.org/doc would be even better :-p. _________________ The person who makes no mistakes does not usually make anything.
Please add [SOLVED] to the subject of your original post when you feel that your problem is resolved. |
|
Back to top |
|
|
spOOwn Apprentice
Joined: 02 Nov 2002 Posts: 259 Location: Belgium
|
Posted: Tue Nov 27, 2007 2:54 pm Post subject: |
|
|
Nice job, this howto works well to for me !! I added GeoIP and GeoIPCity plugin, and it is really interresting statistique on our web site ! Great job ! |
|
Back to top |
|
|
Lori Guru
Joined: 30 Mar 2004 Posts: 338 Location: Barcelona, Spain
|
Posted: Fri Nov 30, 2007 4:03 pm Post subject: |
|
|
IMC wrote: | IMC wrote: |
Well im getting the same problem and I cant figure it out, I cant see anything in the apache conf files to deny running the script and awstats.pl has exec permissions system wide, very odd, but as always, im sure its somethig obvious. |
Ok, I got it to work, sadly though I cant remember what I did, sorry
If I work out what it was, ill post to let you know. |
It would be very useful for me, as I get the same problem... _________________ "The hunt is sweeter then the kill."
Registered Linux User #176911 |
|
Back to top |
|
|
moon604 n00b
Joined: 25 Jan 2008 Posts: 1
|
Posted: Fri Jan 25, 2008 3:00 am Post subject: Re: 403 Forbidden Error |
|
|
meyer37 wrote: | Tried unsuccessfully to follow the how-to yet I am still getting a 403 Forbidden error.
Here is my awstats.conf
Anyhelp would be greatly appreciated.
Code: |
Alias /awstats/classes "/usr/share/webapps/awstats/6.3/htdocs/classes/"
Alias /awstats/css "/usr/share/webapps/awstats/6.3/htdocs/css/"
Alias /awstats/icons "/usr/share/webapps/awstats/6.3/htdocs/icon/"
ScriptAlias /awstats/ "/usr/share/webapps/awstats/6.3/hostroot/cgi-bin/"
ScriptAlias /awstats "/usr/share/webapps/awstats/6.3/hostroot/cgi-bin/awstats.pl"
<Directory "/usr/share/webapps/awstats/6.3/htdocs">
Options None
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
<Directory "/usr/share/webapps/6.3/hostroot/cgi-bin">
Options ExecCGI
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
|
|
if you get 403 forbidden errors remove the <ifmodule mod_access.c> and corresponding </ifmodule> tags. with the latest changes in the apache2 config layout those tags dont trigger anymore and those the crucial allow from all option gets ignored. |
|
Back to top |
|
|
newtonian Guru
Joined: 19 Jan 2005 Posts: 465 Location: Hokkaido Japan
|
Posted: Fri Jan 25, 2008 4:44 am Post subject: Re: 403 Forbidden Error |
|
|
moon604 wrote: |
if you get 403 forbidden errors remove the <ifmodule mod_access.c> and corresponding </ifmodule> tags. with the latest changes in the apache2 config layout those tags dont trigger anymore and those the crucial allow from all option gets ignored. |
How about this:
Code: |
# change
<Directory "/usr/share/webapps/awstats/6.5/htdocs">
Options None
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
# to
<Directory "/usr/share/webapps/awstats/6.5/htdocs">
Options None
AllowOverride None
# <IfModule mod_access.c>
Order allow,deny
Allow from all
# </IfModule>
</Directory>
|
Also <IfModule mod_auth.c> has changed to <IfModule mod_auth_basic.c> if you use basic authentication.
Hope this helps. It got me through the Apache2.0 -> 2.2 upgrade.
Cheers, |
|
Back to top |
|
|
biggyL Tux's lil' helper
Joined: 31 Jan 2005 Posts: 120 Location: Israel
|
Posted: Thu Jan 31, 2008 4:23 pm Post subject: |
|
|
Hello All,
using this nice howto and other users notes I've installed and run an new installation of awstats.
Enjoy my updated Mini-Howto (please check and comment ):
1) Add "net-www/awstats vhosts" to /etc/portage/package.use
2) # emerge -av awstats
3) # cp /usr/share/webapps/awstats/6.5-r1/postinst-en.txt /etc/apache2/awstats.conf
4) Add these lines to /etc/apache2/awstats.conf:
<Directory "/usr/share/webapps/awstats/6.5-r1/hostroot">
Options None
AllowOverride None
Order allow,deny
Allow from all
AuthType Basic
AuthName AWStats
AuthUserFile /etc/awstats/users.pwd
require valid-user
</Directory>
4a) If there is no icons and graphs, do:
if you get 403 forbidden errors remove the <ifmodule mod_access.c> and corresponding </ifmodule> tags. with the latest changes in the apache2 config layout those tags dont trigger anymore and those the crucial allow from all option gets ignored.
Change:
<Directory "/usr/share/webapps/awstats/6.5/htdocs">
Options None
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>
To:
<Directory "/usr/share/webapps/awstats/6.5/htdocs">
Options None
AllowOverride None
# <IfModule mod_access.c>
Order allow,deny
Allow from all
# </IfModule>
</Directory>
Also <IfModule mod_auth.c> has changed to <IfModule mod_auth_basic.c> if you use basic authentication.
5) Add he following to /etc/apache2/httpd.conf:
Include /etc/apache2/awstats.conf
6) Create user for viewing stats:
htpasswd2 -c /etc/awstats/users.pwd adminuser
7) Make config file for every virt. domain:
# cp /etc/awstats/awstats.model.conf /etc/awstats/awstats.yourdomain.com.conf
Create directory for storing stats for every virt. domain
# mkdir -p /your_virt_host_files_location/stats
9) Now edit /etc/awstats/awstats.yourdomain.com.conf file:
LogFile="/var/log/apache2/yourdomain.com-access_log"
SiteDomain="yourdomain.com"
# HostAliases (any aliases your site may have)
HostAliases="www.yourdomain.com another.alias.com"
# DirData (AWStats database where your results will be stored. This has to be writable by the Apache user if the AllowToUpdateStatsFromBrowser option is turned on.)
DirData="/your_virt_host_files_location/stats"
DirIcons="/awstats/icons"
9a) Make acronjob (run every hour):
0 * * * * /usr/share/webapps/awstats/6.5-r1/hostroot/cgi-bin/awstats.pl -config=yourdomain.com -update >/dev/null
Also if using logrotate make sure your /etc/logrotate.d/apache2 contains prerotate...endscipt directions:
/var/log/apache2/*log {
missingok
notifempty
sharedscripts
prerotate
/usr/share/webapps/awstats/6.5-r1/hostroot/cgi-bin/awstats.pl -config=yourdomain.com -update
endscript
postrotate
/etc/init.d/apache2 reload > /dev/null 2>&1 || true
endscript
}
10) You are now ready to build your statistic files for the first time, execute the following command:
# /usr/share/webapps/awstats/6.5-r1/hostroot/cgi-bin/awstats.pl -config=yourdomain.com -update
Update for config "/etc/awstats/awstats.yourdomain.com.conf"
With data in log file "/var/log/apache2/yourdomain.com-access_log"...
Phase 1 : First bypass old records, searching new record...
Searching new records from beginning of log file...
Phase 2 : Now process new records (Flush history on disk after 20000 hosts)...
Jumped lines in file: 0
Parsed lines in file: 253444
Found 284 dropped records,
Found 1 corrupted records,
Found 0 old records,
Found 253159 new qualified records.
Restart Apache so that your configuration changes will be take affect:
# /etc/init.d/apache2 restart
11) Now go to http://yourdomain.com/awstats/awstats.pl
Enjoy!!!
References:
https://forums.gentoo.org/viewtopic-t-279860-postdays-0-postorder-asc-highlight-awstats-start-75.html
http://blog.codefront.net/2004/08/28/setting-up-awstats-on-gentoo/
http://awstats.sourceforge.net/docs/awstats_faq.html |
|
Back to top |
|
|
biggyL Tux's lil' helper
Joined: 31 Jan 2005 Posts: 120 Location: Israel
|
Posted: Fri Feb 01, 2008 8:40 am Post subject: |
|
|
Hello All,
Please correct me if I'm wrong, but if I want to create separate users for each virtual domain I'll add to /etc/awstats/awstats.mydomain.com.conf:
Code: |
AllowAccessFromWebToAuthenticatedUsersOnly=1
AllowAccessFromWebToFollowingAuthenticatedUsers="user1 [user2 ...]"
|
right?
Or there is another way to do it? |
|
Back to top |
|
|
v1pEr n00b
Joined: 20 Apr 2009 Posts: 63
|
|
Back to top |
|
|
|