Truy cập
- Giao diện người dùng web:
https://<server-ip> - Chấp nhận cảnh báo SSL (chứng chỉ tự ký).
- Login using the HTTP auth credentials you provided during installation.
- Thông tin đăng nhập được lưu trữ tại:
/root/peanut/.env
Các tập tin và thư mục quan trọng
- Thư mục ứng dụng:
/root/eigenfocus/ - Tệp Docker Compose:
/root/eigenfocus/docker-compose.yml - Biến môi trường (thông tin xác thực):
/root/eigenfocus/.env - Application data:
/root/eigenfocus/app-data/ - Cấu hình trang web Nginx:
/etc/nginx/sites-available/eigenfocus - Chứng chỉ SSL:
/etc/nginx/ssl/
Quản lý dịch vụ
Docker:
cd /root/peanut
docker compose ps
docker compose restart
docker compose logs -f
Nginx:
systemctl status nginx
systemctl restart nginx
Kích hoạt SSL với tên miền
1. Trỏ tên miền của bạn đến địa chỉ IP của máy chủ.
2. Chỉnh sửa /root/eigenfocus/docker-compose.yml Tệp tin để thiết lập tên miền của bạn: DEFAULT_HOST_URL=https://your.domain.com
3. Tái tạo các dịch vụ:
cd /root/eigenfocus/
docker compose up -d
4. Chỉnh sửa cấu hình Nginx và thay thế cả hai server_name <IP>; với tên miền của bạn (<your-domain>) cho cả khối HTTP (cổng 80) và HTTPS (cổng 443):
vim /etc/nginx/sites-available/eigenfocus
5. Cài đặt Certbot:
apt install -y certbot python3-certbot-nginx
6. Chạy lệnh sau để tạo chứng chỉ Let's Encrypt hợp lệ:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
7. Thay thế đường dẫn SSL trong cấu hình Nginx (phần TLS):
vim /etc/nginx/sites-available/eigenfocus
# 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;
8. Khởi động lại Nginx để áp dụng các thay đổi:
systemctl restart nginx
9. Mở trình duyệt của bạn và truy cập: https://yourdomain.com