x
This commit is contained in:
1 parent
5ba4afb2de
commit
731619af9d
4 files changed
+109
-8
No files matched your search
+24
@@ -0,0 +1,24 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name admin.bigbike.ddcsprocket.com;
|
||||
|
||||
# ตำแหน่งโฟลเดอร์ Build ของ React Admin Panel
|
||||
root /var/www/html/bigbike_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/bigbike_admin_error.log;
|
||||
access_log /var/log/nginx/bigbike_admin_access.log;
|
||||
}
|
||||
Reference in new issue
Block a user