Web Access
- เข้าถึง Poznote ในเบราว์เซอร์ของคุณ:
https://<SERVER-IP> - ยืนยันคำเตือน SSL (self-signed certificate)
- ข้อมูล credential ของ Poznote ถูกจัดเก็บอย่างปลอดภัยใน:
/root/poznote/.env
Important Paths
- Install Directory:
/root/poznote - Persistent Data:
/root/poznote/data - Environment file:
/root/poznote/.env - ไฟล์ docker-compose:
/root/poznote/docker-compose.yml - Nginx Config:
/etc/nginx/sites-available/poznote - SSL Certs:
/etc/nginx/ssl/
การจัดการ Service
Docker:
cd /root/poznote
docker compose ps
docker compose logs -f
docker compose restart
Nginx:
systemctl status nginx
systemctl restart nginx
เปิดใช้งาน SSL พร้อมโดเมน
1. ชี้โดเมนของคุณไปที่ IP ของเซิร์ฟเวอร์
2. แก้ไขไฟล์คอนฟิก Nginx และแทนที่ทั้งสองส่วน server_name <IP>; ด้วยโดเมนของคุณ (<your-domain>) สำหรับทั้งบล็อก HTTP (port 80) และ HTTPS (port 443):
vim /etc/nginx/sites-available/poznote
3. Install Certbot:
apt install -y certbot python3-certbot-nginx
4. รันคำสั่งต่อไปนี้เพื่อสร้างใบรับรอง Lets Encrypt ที่ถูกต้อง:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. แทนที่พาธ SSL ในไฟล์คอนฟิก Nginx:
vim /etc/apache2/sites-available/poznote
# 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