Matomo에 접근하기
- 웹 브라우저를 열고 다음 주소로 이동하세요:
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. 유효한 Lets 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