Most defaults should be fine. The default configuration should also be documented well enough for you to know what do do.
It is strongly recommended to only use absolute paths.
Now you fill collect the data from the nginx log specified as `access_log` in the configuration into the database specified at the `database` location (or `~/.local/share/regina/my-server.com.db` if left blank):
```
regina --config ~/.config/regina/regina.cfg --collect
```
To visualize the data, run:
```
regina --config ~/.config/regina/regina.cfg --visualize
```
This will generate plots and statistics and replace all variables in `template_html` and output the result to `html_out_path`.
If `html_out_path` is in your webroot, you should now be able to access the generated site.
In our example, `/www` will look like this:
```
/www
|-- analytics
| |-- analytics.html
| |-- img
| |-- ranking_referer_total.svg
| |-- ranking_referer_last_x_days.svg
| ...
|-- resources
| |-- image.jpg
|-- index.html
```
### Automation
You will probably run `regina` once per day, after `nginx` has filled the daily access log. The easiest way to that is using a *cronjob*.
This will make you the owner of the log 9 minutes after midnight, just before `regina` needs read access.
## GeoIP
`regina` can show you from which country or city a visitor is from, but you will need an *ip2location* database.
You can acquire such a database for free at [ip2location.com](https://lite.ip2location.com/) (and probably some other sites as well!).
After creating create an account you can download several different databases in different formats.
For `regina`, download the `IP-COUNTRY-REGION-CITY` for IPv4 as *csv*.
By default, `regina` only tells you which country a user is from.
To see the individual cities for countries, append the two-letter country code to the `get_cities_for_contries` option in the `data-collection` section in the config file.
After that, oad the GeoIP-data into your database:
```
regina --config regina.conf --update-geoip path-to-csv