Access
- 브라우저를 열고 아래 주소로 이동하세요:
https://<SERVER_IP> - 브라우저에서 SSL 경고가 표시될 수 있습니다 (자체 서명 인증서)
- 인증이 필요합니다 (Basic Auth 팝업)
- 인증 방식: HTTP Basic Auth
- 자격 증명 저장 위치:
/root/.cloudzy-creds
주요 파일 및 디렉토리
- Install directory:
/opt/glance - Docker Compose:
/opt/glance/docker-compose.yml - Environment file:
/opt/glance/.env - Config directory:
/opt/glance/config - Home config:
/opt/glance/config/home.yml - Main config:
/opt/glance/config/glance.yml - Assets directory:
/opt/glance/assets - Custom CSS:
/opt/glance/assets/user.css - Nginx config:
/etc/nginx/sites-available/glance.conf - SSL certificates:
/etc/nginx/ssl - Auth file:
/etc/nginx/auth/.glance-htpasswd - Credentials file:
/root/.glance-credentials
스택 관리
설치 디렉토리로 Go:
cd /opt/glance
자주 쓰는 Docker Compose 명령어:
# Check status
docker compose ps
# View logs (follow live)
docker compose logs -f
# Restart all services
docker compose restart
# Stop services
docker compose down
# Start again
docker compose up -d
Nginx에서 HTTP Basic Auth 비활성화하기 (선택 사항)
Nginx 사이트 파일 편집: /etc/nginx/sites-available/glance.conf
다음 줄을 삭제하거나 주석 처리하세요:
auth_basic "Restricted";
auth_basic_user_file /etc/nginx/auth/.glance-htpasswd;
Reload Nginx:
systemctl restart nginx
도메인으로 SSL 활성화하기
1. 도메인을 서버 IP로 연결합니다.
2. Nginx 설정을 편집하여 server_name <IP>; 을 실제 도메인으로 교체합니다 (<your-domain>) HTTP (포트 80) 및 HTTPS (포트 443) 블록 모두에 적용합니다:
vim /etc/nginx/sites-available/glance.conf
3. Install 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/glance.conf
# Before:
# ssl_certificate /etc/nginx/ssl/fullchain.pem;
# ssl_certificate_key /etc/nginx/ssl/privkey.pem;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. 변경 사항을 적용하기 위해 Nginx를 재시작합니다:
systemctl restart nginx
7. 브라우저를 열고 다음 주소로 접속하세요: https://yourdomain.com