Få adgang til Matomo
- Åbn din webbrowser og gå til:
http://<SERVER-IP> - Følg Matomo's webopsætningsguide for at fuldføre installationen.
Vigtige filer og mapper
- Webroot:
/var/www/matomo(ejet afwww-data:www-data) - Apache-konfiguration:
/etc/apache2/sites-available/matomo.conf - Logfiler:
/var/log/apache2/matomo_error.log&/var/log/apache2/matomo_access.log - Databaselegitimationsoplysninger:
/root/.cloudzy-creds
Databaseopsætning
Indtast følgende legitimationsoplysninger fra den genererede fil under opsætningen (/root/.cloudzy-creds):
- Databaseserver:
127.0.0.1 - Logind:
matomo - Adgangskode: Tilfældigt genereret
- Databasenavn:
matomo
Apache Management
Administrer Apache-tjenesten med systemd-kommandoer:
systemctl status apache2
systemctl restart apache2
systemctl stop apache2
systemctl start apache2
Aktivér SSL med et domæne
1. Peg dit domæne på serverens IP-adresse.
2. Rediger Apache-konfiguration og erstat ServerName <IP> med dit domæne (ServerName <your-domain>):
vim /etc/apache2/sites-available/matomo.conf
3. Installer Certbot:
apt install -y certbot python3-certbot-apache
4. Kør følgende kommando for at generere et gyldigt Let's Encrypt-certifikat:
certbot --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Genstart Apache for at anvende ændringerne:
systemctl restart apache2
6. Rediger Matomo-konfigurationsfilen (/var/www/matomo/config/config.ini.php) og opdater trusted_hosts indstilling under [General] til at inkludere dit domæne i stedet for IP-adressen:
[General]
trusted_hosts[] = "yourdomain.com"
7. Åbn din browser og gå til: https://yourdomain.com