접근
- URL 열기:
https://<SERVER_IP> - HTTPS는 자체 서명 인증서를 사용합니다.
- 첫 접근 시 브라우저 경고가 나타나는 것이 정상입니다.
- 브라우저 인증서 경고를 수락하세요.
- 다음으로 리디렉션됩니다:
/create-admin첫 접근 시. - 웹 인터페이스에서 관리자 계정을 생성하세요.
- 관리자 계정으로 로그인하세요.
중요한 파일과 디렉토리
- 설치 경로:
/root/kutt - Compose 파일:
/root/kutt/docker-compose.yml - 환경 파일:
/root/kutt/.env - Nginx 설정:
/etc/nginx/sites-available/kutt - SSL 인증서:
/etc/nginx/ssl/kutt.crt - SSL 개인 키:
/etc/nginx/ssl/kutt.key - PostgreSQL 데이터 볼륨:
/var/lib/docker/volumes/kutt_db_data_pg/_data - Redis 데이터 볼륨:
/var/lib/docker/volumes/kutt_redis_data/_data - 사용자 지정 데이터 볼륨:
/var/lib/docker/volumes/kutt_custom/_data
Docker 관리
상태 확인:
docker compose -f /root/kutt/docker-compose.yml ps
로그 보기:
docker compose -f /root/kutt/docker-compose.yml logs -f
서비스 다시 시작:
docker compose -f /root/kutt/docker-compose.yml restart
서비스 중지:
docker compose -f /root/kutt/docker-compose.yml down
서비스 시작:
docker compose -f /root/kutt/docker-compose.yml up -d
NGINX 관리
테스트 구성:
nginx -t
NGINX 재시작:
systemctl restart nginx
NGINX 리로드:
systemctl reload nginx
상태 확인:
systemctl status nginx
도메인으로 SSL 활성화
1. 도메인을 서버 IP로 지정하세요.
2. Nginx 설정 편집 및 둘 다 교체 server_name _; 도메인으로 (server_name <yourdomain.com>) HTTP (포트 80)와 HTTPS (포트 443) 블록 모두:
vim /etc/nginx/sites-available/kutt
3. Certbot 설치:
apt install -y certbot python3-certbot-nginx
4. 유효한 Let's Encrypt 인증서를 생성하려면 다음 명령을 실행합니다:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Nginx 설정의 SSL 경로 교체:
vim /etc/nginx/sites-available/kutt
# Before:
# ssl_certificate /etc/nginx/ssl/kutt.crt;
# ssl_certificate_key /etc/nginx/ssl/kutt.key;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. 변경 사항을 적용하려면 Nginx를 다시 로드합니다:
systemctl reload nginx
7. 다음을 편집하세요: /root/kutt/.env 도메인 이름을 설정하는 파일: DEFAULT_DOMAIN=yourdomain.com
8. 서비스 다시 만들기:
cd /root/kutt
docker compose up -d
9. 브라우저를 열고 방문: https://yourdomain.com