# Настройка модуля

Конфигурационный файл размещается в `modules/geoip/config/driver.php` и содержит массив имен драйверов и их настройки, например:

{% code lineNumbers="true" fullWidth="true" %}

```php
<?php

return array (
	'default' => array (
		'driver' => 'sypexgeo',
	),
	'sypexgeo' => array (
		'driver' => 'sypexgeo',
		'key' => '',
		'server' => 'http://api.sypexgeo.net',
		'type' => 'db', // db or api
	),
	'ipbase' => array (
		'driver' => 'ipbase',
		'key' => '',
	),
	'maxmind' => array (
		'driver' => 'maxmind',
		'key' => '',
	),
	'yandex' => array (
		'driver' => 'yandex',
		'apikey' => '',
	),
	'google' => array (
		'driver' => 'google',
		'key' => '',
	),
	'dadata' => array (
		'driver' => 'dadata',
		'token' => '',
	),
	'2gis' => array (
		'driver' => '2gis',
		'key' => '',
	),
	'ipgeobase' => array (
		'driver' => 'ipgeobase',
		'type' => 'db', // db or api
	),
	'geoip' => array (
		'driver' => 'geoip',
		'custom_directory' => '/usr/share/GeoIP/'
	),
);
```

{% endcode %}

где индексом является уникальное название драйвера, а значением массив опций, например:

* **driver** — имя драйвера, осуществляющего работу с geoip. Файлы дополнительных драйверов располагаются в директории modules/geoip/;
* **key|apikey|token** — возможные ключи для доступа к сервису;
* **server** — возможный адрес сервиса для взаимодействия по api;
* **type** — тип работы сервиса локально (db) или по API (api);

**default** — вид драйвер geoip который используется по умолчанию. Вы можете поменять на любой другой доступный драйвер.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.morozovpimnev.ru/geoip/nastroika-modulya.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
