마토모 액세스
- 웹 브라우저를 열고 다음으로 이동하십시오.
http://<SERVER-IP> - Matomo 웹 설정 마법사를 따라 설치를 완료하세요.
중요한 파일 및 디렉토리
- 웹 루트:
/var/www/matomo(소유자:www-data:www-data) - 아파치 구성:
/etc/apache2/sites-available/matomo.conf - 로그:
/var/log/apache2/matomo_error.log&/var/log/apache2/matomo_access.log - 데이터베이스 자격 증명:
/root/.cloudzy-creds
데이터베이스 설정
설정 중에 생성된 파일에서 다음 자격 증명을 입력합니다(/root/.cloudzy-creds):
- 데이터베이스 서버:
127.0.0.1 - 로그인:
matomo - 비밀번호: 무작위로 생성됨
- 데이터베이스 이름:
matomo
아파치 관리
systemd 명령을 사용하여 Apache 서비스를 관리합니다.
systemctl status apache2
systemctl restart apache2
systemctl stop apache2
systemctl start apache2
도메인으로 SSL 활성화
1. 도메인을 서버 IP로 지정하세요.
2. Apache 구성 편집 및 교체 ServerName <IP> 도메인으로 (ServerName <your-domain>):
vim /etc/apache2/sites-available/matomo.conf
3. Certbot 설치:
apt install -y certbot python3-certbot-apache
4. 유효한 Let's Encrypt 인증서를 생성하려면 다음 명령을 실행하십시오:
certbot --apache --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Apache를 다시 시작하여 변경 사항을 적용합니다.
systemctl restart apache2
6. Matomo 구성 파일을 편집합니다(/var/www/matomo/config/config.ini.php) 그리고 업데이트하세요. trusted_hosts 아래 설정 [General] IP 대신 도메인을 포함하려면 다음을 수행하세요.
[General]
trusted_hosts[] = "yourdomain.com"
7. 브라우저를 열고 방문: https://yourdomain.com