เข้าถึงผู้ดูแลระบบ Ghost
URL: https://<server-ip>/ghost
ตั้งค่าเริ่มต้นให้เสร็จสมบูรณ์: สร้างผู้ใช้ที่เป็นผู้ดูแลระบบและกำหนดค่าไซต์
จัดการ Ghost ผ่าน Docker Compose
cd /root/ghost docker compose ps # View running containers docker compose up -d # Start Ghost docker compose down # Stop Ghost docker compose restart # Restart Ghost
ข้อมูลประจำตัวและการกำหนดค่า
เก็บไว้ใน /root/ghost/.env และ /root/ghost/docker-compose.yml
การตั้งค่าอีเมล
ไม่แสดงความคิดเห็น mail ส่วนใน /root/ghost/docker-compose.yml.
รีสตาร์ทคอนเทนเนอร์:
cd /root/ghost; docker compose restart
ตรวจสอบให้แน่ใจว่าได้รับสิทธิ์การเข้าถึง SMTP
ตัวอย่างการใช้รหัสผ่านแอป Gmail:
mail__transport: SMTP mail__options__host: smtp.gmail.com mail__options__port: 465 mail__options__secure: true mail__options__auth__user: [email protected] mail__options__auth__pass: your-app-password
โดเมนและ SSL
ชี้โดเมนของคุณไปที่ IP ของเซิร์ฟเวอร์
อัปเดต /root/ghost/docker-compose.yml URL ไปยังโดเมน (url: https://your-domain)
รีสตาร์ทคอนเทนเนอร์:
cd /root/ghost; docker compose restart
สำหรับ Certbot SSL:
apt install -y certbot python3-certbot-nginx certbot certonly --nginx --non-interactive --agree-tos --email <your-email> -d <your-domain>
แทนที่เส้นทาง SSL ใน /etc/nginx/sites-enabled/ghost.
# Example ssl_certificate /etc/letsencrypt/live/your-domain/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/your-domain/privkey.pem;
โหลด Nginx ใหม่:
nginx -t && systemctl reload nginx