เจอปัญหา nginx.conf ใน wwwroot ไม่ทำงาน เพราะจริงๆแล้ว Azure ยังคงใช้ไฟล์ default ของตัวเอง
วิธีแก้คือ ต้องเข้าไปตั้งค่า Startup Command ถึงจะทำให้ config ของเรามีผลจริง
สร้างไฟล์ config ชื่อ myconf ไว้ใน root ของ repo
เพื่อบังคับใช้ตำแหน่ง root ใหม่(เช่น CodeIgniter 4 ต้องการ /public)
ตั้งค่าใน Azure App Service
→ Configuration
→ General settings
→ Startup Command :
cp /home/site/wwwroot/myconf /etc/nginx/sites-available/default && service nginx reload
Save!
Azure App Service(Linux) + nginx.conf ที่งมอยู่นาน