-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow manual configuration of the path of the GeoIP2 database #22557
Comments
Hi @jsabater, |
@jsabater This should already be kind of possible if you adjust the DI config. If there is not yet a <?php
return [
'path.geoip2' => '/var/lib/GeoIP/'
]; The geoip files still need to have an expected name to be picked up automatically: matomo/plugins/GeoIp2/LocationProvider/GeoIp2.php Lines 41 to 48 in 9a3ef94
|
Hi, @sgiehl , and thanks for the indications. I think that you mean the <?php
return [
'path.geoip2' => Piwik\DI::string('{path.root}/misc/'),
'geopip2.ispEnabled' => true
]; From your words, I understand I would change it into something like this, correct? <?php
return [
'path.geoip2' => '/var/lib/GeoIP/',
'geopip2.ispEnabled' => true
]; I could add a task to my Ansible playbook to do this substitution as part of the application upgrade. I take it that would be all? Would there be any way I could programmatically enable the Geolocation plug-in at |
No. I really meant creating a config file in config directory. That file will automatically overwrite the config in geoip plugin. |
@sgiehl , thanks for the clarification. I'll create a |
When you already have the geolocation available in the system, or when you configure Matomo with
enable_internet_features = 0
, it would be useful to be able to configure Matomo (Settings: System: Geolocation
) with the path to the database file. Matomo would, then, not worry about updates or anything, but just use it.An example scenario would be:
geoipupdate
package, which has a cron job to update MaxMind's database periodically.In this scenario, when accessing the
Settings: System: Geolocation
menu entry, when selecting the "DBIP / GeoIP 2 (Php)" option, one would be offered different options at the bottom "Setup automatic updates of geolocation databases":When using the second option, just a field with the path would be necessary:
Path to GeoIP2 database: /var/lib/GeoIP/GeoLite2-City.mmdb
I understand that this would support a DB-IP database as well.
Thanks.
The text was updated successfully, but these errors were encountered: