Files
homaroma/serverinfo/192.168.1.26/foxxio.ddcsprocket.com/nginx/admin.foxxio.ddcsprocket.com.conf
T

25 lines
861 B
Plaintext

server {
listen 80;
server_name admin.foxxio.ddcsprocket.com;
# ตำแหน่งโฟลเดอร์ Build ของ React Admin Panel
root /var/www/html/foxxio_admin;
index index.html;
# สำคัญมากสำหรับ React Router SPA:
# ถ้าไม่พบไฟล์ ($uri) ให้ส่งกลับไปที่ index.html เสมอ
location / {
try_files $uri $uri/ /index.html;
}
# ตั้งค่า Cache สำหรับ Static Assets เพื่อความเร็ว
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires 30d;
add_header Cache-Control "public, no-transform";
}
# Logging
error_log /var/log/nginx/foxxio_admin_error.log;
access_log /var/log/nginx/foxxio_admin_access.log;
}