After my prior message (Awstats|how to access?), now customer want to see “origin country”
All IP have “Unknown (unresolved ip)” status
/etc/awstats/awstats.conf is the original and have ‘DNSLookup=1’
Is there any setting that I should activate?
I read that site and others before ask here.
However, I m lookig for “oficial way” or “nearest to oficial way”
Following that old guide maybe is not suitable for updated enviroment. GeoIP.dat is not longer available, and actually, format is mmdb.
Maybe, this https://github.com/eldy/awstats/issues/86 link could be more useful.
It’s an issue opened at 2018, and still open.
Seems to be easier convert to old format than use actual.
There is no “official way” or “nearest to official way”. We didn’t even know that it didn’t work properly.
I quit using this kind of software years ago de to inaccuracies of measuring. There are better alternatives available.
As explained in here Regarding DNS problem
We share the code for free. Try to improve the system mainly for our self how ever instead keeping it for our self we share the result and spread some love (and some code). Try to fix a solution by your self. And then create or a tutorial for it or maybe even create a pull request. This way the software can be improved.
If you want a Hosting Control panel out of the box please buy Cpanel…
Well, it’s not my fault that you didn’t know that this option is not working.
Yes, I know that is not best tool and that are better alternatives.
And after 3rd paragraph: well…What can I say. 20 years using linux, and “What do you want from me? It’s free!” is always there.
I fix it, but if I ask for an official or nearest way, is because I don’t want to fuck all install.
If you say: “we don’t have idea”, I can take as valid answer too.
Even a “wow, you found a bug, please, fill a report at github and will be try our best, but maybe take years (or never)” …
If you have a bad day, take a rest.
I have to admit I did not look deeper into it, before posting the link. if you tried that geoip plugin before and found it not working, that piece of information would have been helpful in your starting post already
however, awstats is a third party service that gets installed along with others. Hestia relies on the version in the repos to be somehow ready to use and it won’t really fix outdated or missing stuff within for you. so I am afraid indeed this is something you need to figure yourself or take over to the AWStats git/forums…
as others pointed out already, of course we can look into integrating a patch or plugin, but I think even then there can’t be real support here, as it’s always gonna be a plugin for third party software anyway
sorry if we sometimes sound rude here, just trying to set expecatations very straight all the time. I also guess different tone of voice often does translate badly and therefore answer might not sound like they are intended to
Oke found the non out of the box solutions
Login as root or use sudo
Step 1 Check if the following package is installed with / or install it
apt-get install perl-CPAN
perl -MCPAN -e "install Geo::IP::PurePerl"
perl -MCPAN -e "install Geo::IP"
Uncomment the following line in
#LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
Edit the file awstats.domain.com.conf and add the line
LoadPlugin="geoip GEOIP_STANDARD /usr/share/GeoIP/GeoIP.dat"
Run the following command:
echo "$BIN/v-update-web-domain-stat user domain.com" >> \
Force update AWStats
Please try and confirm it is working then I will try to create the out of the box solutions.
Please remind to update currently not the the domain via the control pannel as this will overwrite the changes in Awstats domain config.
(Changed few commands !)
We had some issues with implementing it during the install. How ever you can use the following command
wget -O $HESTIA/bin/v-update-sys-hestia-git https://raw.githubusercontent.com/hestiacp/hestiacp/master/bin/v-update-sys-hestia-git
chmod +x $HESTIA/bin/v-update-sys-hestia-git
And then execute the file
And follow the instructions. During the next update of Awstats it should work according before…
In the future some additional information will be created…
I could’nt fixed by myself. Seems that something not working. Also, I don’t take in mind to edit Hestia templates before. It could be related.
I did a rollback of all my changes.
I’m trying with proposed solution upgrading Hestia to master branch
This have an error:
[email protected]:~# bash /usr/local/hestia/install/upgrade/manual/install_awstats_geoip.sh
grep: /usr/local/hestia/data/templates/web/awstats/awstats.conf: No such file or directory
Database was generated on Sat, 16 May 2020 13:41:04 GMT
Geo::IP::PurePerl is up to date (1.26).
Database was generated on Sat, 16 May 2020 13:41:04 GMT
Geo::IP is up to date (1.51).
sed: can't read /etc/awstats.conf: No such file or directory
Right path is /etc/awstats/awstats.conf
After run manually
sed -i '/LoadPlugin=\"geoip GEOIP_STANDARD \/usr\/share\/GeoIP\/GeoIP.dat\"/s/^#//g' /etc/awstats/awstats.conf and exec again
/usr/local/hestia/bin/v-update-sys-queue webstats (with new webstats.pipe added) seems to be working, but I will waint until tomorrow and let that awstats run tonight (my version hang at night)
But, seems to be working
Thanks for testing, please let me know if tomorrow all is working properly.
Changed the file names in git accordingly. Anyway thanks for testing
Seems that after run proposal solution, at some point all dns configuration has been reset to default (upgrading to master, maybe?).
I had some custom records going to others servers or specific settings
I m doing a backup restore. Well… it’s saturday and mostly, will not notice it
¯ \ _ (ツ) _ / ¯
Upgrade does a rebuild of the hestia users, this may include also dns configuration. Also you should have been warned while running v-update-sys-hestia-git that this command isnt for production server at all :
Can you write more what exactly you’ve edited and got a reset during the upgrade? Just to know if that is something we would need to fix before we release the new version.
I saw it, but I didn’t think that will reset dns config without copy to /root/hst_backups/ XD
Seems that most of changes, are A and WWW pointing to another server.
domain.com. 300 IN A 126.96.36.199
www 300 IN A 188.8.131.52
I just host emails
I did a basic restore:
tar -xf /backup/username.2020-05-16_06-49-22.tar --wildcards "*.db"
cat /backup/dns/domain.com/conf/domain.com.db > /home/user/conf/dns/domain.com.db
However, on Hestia CP I still with hard resetted version (?)
Please create a bug report at https://github.com/hestiacp/hestiacp/issues
This shouldn’t be allowed…
DNS should not be resettet, there is no reason for it at all. As @eris wrote, please open a issue report with all informations you can get, so we can track down and try to reproduce your issue.
Did some debugging
Just setup a test server that can be safely be destroyed Added a domain and “played” some thing with the settings
I had already changed some values in the www record / A record
Switched from test branch to release checked everything was the same
Switched a few times between master and release. No issue
The I changed the default IP in /edit/dns/ and then switched between the releases everything gets reset… to the new IP.
Could you please check what the IP value in /edit/dns was and include this information in the bug report?
As Maxmind currently do not update their GeoIP database (.db) version there can be free of charge download the GeoIP 2 Lite version in .mmdb.
Here is a converter to convert .mmdb to .db. https://github.com/sherpya/geolite2legacy
or all-ready converted https://mailfud.org/geoip-legacy/