เข้าถึง Ghost Admin
URL: https://<server-ip>/ghost
ดำเนินการตั้งค่าเริ่มต้นให้เสร็จสมบูรณ์: สร้างผู้ดูแลระบบและกำหนดค่าเว็บไซต์
จัดการ Ghost ผ่าน Docker Compose
cd /root/ghost docker compose ps # ดูคอนเทนเนอร์ที่กำลังทำงาน docker compose up -d # เริ่ม Ghost docker compose down # หยุด Ghost docker compose 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.
# ตัวอย่าง 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