#19 [Audit] ออก SSL จริงสำหรับทุกโดเมนที่จะย้าย (ตอนนี้ certbot ยังไม่มี cert)
รอ DNS ชี้เข้าเครื่องนี้ก่อน แล้ว run certbot --nginx ต่อโดเมน
Viewer only. AI writes updates through API.
status=in_progress | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T04:34:07+07:00status=blocked | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T04:48:37+07:00status=blocked | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T05:10:28+07:00status=todo | priority=high | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-25T23:03:30+07:00status=todo | priority=high | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-25T23:03:30+07:00status=todo | priority=high | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T01:41:19+07:00status=todo | priority=high | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T01:41:19+07:00status=doing | priority=high | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T04:55:06+07:00status=blocked | priority=medium | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-25T22:29:21+07:00status=todo | priority=medium | owner=ops | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-25T23:03:30+07:00status=open | priority=medium | owner=- | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T04:48:37+07:00status=blocked | priority=medium | owner=- | project=- | site=- | due=-
reasons: missing_required | updated: 2026-05-26T05:10:28+07:00status=done | priority=urgent | owner=- | project=VPSPro | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=urgent | owner=- | project=class.lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:33:54+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:33:54+07:00status=done | priority=urgent | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:33:54+07:00status=done | priority=high | owner=- | project=VPSPro | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:13:22+07:00status=done | priority=high | owner=- | project=VPSPro | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:13:48+07:00status=done | priority=high | owner=- | project=VPSPro | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:21:19+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=high | owner=- | project=VPSPro | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:33:10+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:38:01+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:41:50+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:58:44+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T23:03:16+07:00status=done | priority=high | owner=- | project=VPSPro Migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T00:10:05+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T00:10:05+07:00status=done | priority=high | owner=- | project=class.lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T01:41:27+07:00status=done | priority=high | owner=- | project=class.lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T02:20:39+07:00status=done | priority=high | owner=- | project=lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T02:31:50+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:33:54+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:33:54+07:00status=done | priority=high | owner=- | project=class.lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:45:01+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:45:01+07:00status=done | priority=high | owner=- | project=class.lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:48:37+07:00status=done | priority=high | owner=- | project=class.lnwsj.com | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T04:55:07+07:00status=done | priority=high | owner=- | project=VPSPro | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T05:10:28+07:00status=done | priority=high | owner=- | project=vpspro-migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:18:31+07:00status=done | priority=high | owner=- | project=vpspro-migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:18:31+07:00status=done | priority=high | owner=- | project=vpspro-migration | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:18:31+07:00status=done | priority=high | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:18:31+07:00status=done | priority=high | owner=- | project=timesheet app | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:26:09+07:00status=done | priority=high | owner=- | project=timesheet app | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:46:00+07:00status=done | priority=high | owner=- | project=todo.namnan.co.th | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T06:54:56+07:00status=done | priority=high | owner=- | project=todo.namnan.co.th | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-26T07:01:10+07:00status=done | priority=medium | owner=ops | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:29:21+07:00status=done | priority=medium | owner=ai | project=- | site=- | due=-
reasons: done_without_evidence | updated: 2026-05-25T22:58:44+07:00รอ DNS ชี้เข้าเครื่องนี้ก่อน แล้ว run certbot --nginx ต่อโดเมน
รัน /usr/local/sbin/vpspro-backup.sh แบบ manual 1 รอบเพื่อยืนยัน dump DB ผ่าน
กำหนดวัน/เวลา cutover, ผู้รับผิดชอบ, ช่องทางสื่อสาร
ลด TTL ก่อน cutover, จดค่าปัจจุบันไว้ rollback
สร้าง service instance ตามชื่อแอปจริงแล้ว enable/start
https://class.lnwsj.com = 200 (pass), but https://www.class.lnwsj.com handshake fail at edge; old server local HTTPS probe also handshake fail.
ทดสอบความพร้อมก่อนสลับ DNS โดยยืนยัน backup/restore/db/app/ssl/rollback ครบ ลด downtime และกันข้อมูลหาย
กำหนดเกณฑ์ rollback ชัดเจน เช่น error rate, DB write fail, response time
login/admin/upload/api/cron/email/jobs + log/error-rate
1) Toggle www.class to DNS-only and point to 157.85.98.240 (or provision Advanced cert for deep subdomain). 2) Run certbot --nginx -d class.lnwsj.com -d www.class.lnwsj.com --expand. 3) Re-run full smoke test and close debug item.
Bootstrapped from installation master plan (no Docker)
curl https://www.class.lnwsj.com fails with sslv3 alert handshake failure; A/AAAA resolve to Cloudflare IPs.
เตรียมเครื่องปลายทางให้พร้อมก่อนติดตั้ง stack หลัก
Bootstrapped from installation master plan (no Docker)
รัน apt update/upgrade เสร็จ, timezone=Asia/Bangkok, UFW active allow 22/80/443; พบ reboot-required จาก libc6/dbus
Bootstrapped from installation master plan (no Docker)
ตั้ง Nginx เป็น edge หลักและเตรียม SSL อัตโนมัติ
ติดตั้งและตั้งค่าฐานข้อมูลหลัก MySQL/PostgreSQL
Bootstrapped from installation master plan (no Docker)
Bootstrapped from installation master plan (no Docker)
Bootstrapped from installation master plan (no Docker)
Completed source inventory, full DB snapshot, web files transfer (~528MB), DB restore (86 tables), app vhost enable, and login page smoke on new server.
mysql dump/postgres dump + rsync uploads + nginx conf + .env
ยืนยัน restore เปิดได้จริง ไม่ใช่ backup อย่างเดียว
เพิ่ม plans/todos ตามแผน no-docker และกำหนด process ให้ update ทุกครั้งที่ทำงานเสร็จ
เพิ่ม rule plan/todo เพื่อใช้เป็น process บังคับระหว่างทำ P0-P6
ติดตั้งเครื่องมือพื้นฐานสำหรับดูแลระบบและแก้ปัญหา
Bootstrapped from installation master plan (no Docker)
ติดตั้งและยืนยัน base tools: git curl wget rsync unzip zip jq htop iotop nload ncdu tree acl ufw fail2ban
Bootstrapped from installation master plan (no Docker)
รองรับเว็บ PHP หลักบน php8.3-fpm และเตรียม compatibility กรณีเว็บเก่า
auto-updated from execution evidence
auto-updated from execution evidence
เตรียม runtime สำหรับแอป Python/Node และ process manager
auto-updated from execution evidence
เตรียม service, logging, backup, และโครง directory มาตรฐาน
Bootstrapped from installation master plan (no Docker)
auto-updated from execution evidence
คุมไม่ให้งานตกหล่นและให้ทีมเห็นสถานะล่าสุดตลอดเวลา
auto-updated from execution evidence
Bootstrapped from installation master plan (no Docker)
Bootstrapped from installation master plan (no Docker)
Bootstrapped from installation master plan (no Docker)
Bootstrapped from installation master plan (no Docker)
Bootstrapped from installation master plan (no Docker)
บังคับใช้งานกับทุก phase
Verified /api/summary on local viewer and confirmed target services active.
Added project_id/environment/source/repo_root/notion_url on viewer header and viewer API payload.
Captured versions, binaries, runtime metadata, PM2 state, and maintenance flags for both stacks.
Node moved to v22.22.2 via NodeSource; npm=10.9.7; both Python/Node templates present under systemd app-*@.service.
Verified runtime, services, DB hardening, firewall, SSL timer, backup scheduler, and open todos. Remaining: reboot, php8.1 decision, SSL issuance, first backup verification, app instance binding.
Host rebooted successfully; reboot_required cleared; nginx/php8.3-fpm/mysql/postgresql/fail2ban/certbot.timer/cron all active.
ต้องรีบูตเพื่อให้แพ็กเกจอัปเดตมีผลครบถ้วน
Created plan + 9 todos for backup/restore/readiness/ssl/dns/monitoring before DNS switch.
Created maintenance page, nginx vhost config, and enable/disable scripts. Verified page render when enabled and restored default after test.
Generated BIND zone file from provided DNS table for Cloudflare Import DNS Records.
บันทึก config/version/path ทั้งหมดจากเครื่องเดิม
curl + browser smoke ด้วย /etc/hosts ก่อนเปลี่ยน DNS
Ran certbot on 157.85.98.240; cert active and HTTPS 200 via Cloudflare for class.lnwsj.com. www.class.lnwsj.com still TLS handshake fail at Cloudflare edge.
ตรวจ A/AAAA, เปิดพอร์ต 80/443, เตรียม nginx server block
PASS: DNS resolves via Cloudflare, class.lnwsj.com HTTP->HTTPS and HTTPS 200 on edge and origin, DB/table/filesystem/service checks pass. FAIL/BLOCKER: www.class.lnwsj.com HTTPS handshake fail; old-origin HTTPS rollback probe handshake fail.
Installed class-cutover-monitor systemd timer on 157.85.98.240 (every 5 min). Trigger rules created for public/origin/db/service/latency/disk and evidence logs at /var/log/class-cutover/events.log.
Public: class root/login 200. www.class TLS handshake fail at Cloudflare edge. Origin direct to 157.85.98.240 class root/login 200. Services nginx/php8.3-fpm/mysql active. Disk / usage 2%.
สร้างไฟล์ MIGRATION_CHECKLIST_2026-05-26.md ระบุงานที่ย้ายเสร็จแล้ว, validation ล่าสุด, open items, rollback readiness
รัน crawl + smoke + HTTP/TLS matrix + infra health แล้วออกรายงาน fullsystem-deep-report-latest.html พร้อมรูปทุกหน้าที่เข้าถึงได้
ยืนยันว่าเว็บไม่ได้ช้าจริง: ผ่าน Cloudflare avg_total ~78-94ms, origin direct ~46-71ms; ตัวเลข ~600ms เดิมมาจากวิธีวัด waitUntil=networkidle
บันทึกงานรอบล่าสุดลง timesheet app เพื่อให้ viewer เห็นสถานะปิดงานและหลักฐาน
เพิ่ม query ?site=... ที่ backend/frontend, เพิ่ม type=activities, และยืนยันกรอง class.lnwsj.com ได้จริง
ขยาย schema + viewer + admin form ให้เก็บและแสดงชื่อเครื่อง, โปรแกรมที่ใช้, AI model และ model version
Version 1 deployed with systemd service and HTTPS reverse proxy
Admin Quick Add now supports suggestion dropdown (datalist) for machine/program/model/version with defaults + history values
Added schema migrations and validation rules: owner/due_date/project/site/priority required; done/resolved/closed require evidence. Added risk summary + alert list UI and API exposure.
Bootstrapped from installation master plan (no Docker)
ใช้ NodeSource หรือ nvm ตามมาตรฐาน production ที่ต้องการ