|
|
|
@ -14,6 +14,11 @@ upstream nextjs_frontend { |
|
|
|
keepalive 32; |
|
|
|
} |
|
|
|
|
|
|
|
upstream panel_frontend { |
|
|
|
server 88.99.212.243:7228; |
|
|
|
keepalive 16; |
|
|
|
} |
|
|
|
|
|
|
|
upstream chat_service { |
|
|
|
server 88.99.212.243:8020; |
|
|
|
keepalive 32; |
|
|
|
@ -166,7 +171,23 @@ server { |
|
|
|
return 301 /en/imam-javad/admin/; |
|
|
|
} |
|
|
|
|
|
|
|
# ========== 11. Next.js Frontend (Catch-all - Lowest Priority) ========== |
|
|
|
# ========== 11. Admin Panel (React/Vite) ========== |
|
|
|
# Served at /panel/ — internal Nginx handles SPA routing |
|
|
|
location /panel/ { |
|
|
|
proxy_pass http://panel_frontend; |
|
|
|
proxy_http_version 1.1; |
|
|
|
proxy_set_header Host $host; |
|
|
|
proxy_set_header X-Real-IP $remote_addr; |
|
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
|
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
|
|
} |
|
|
|
|
|
|
|
# Redirect /panel → /panel/ (trailing slash matters for base path) |
|
|
|
location = /panel { |
|
|
|
return 301 /panel/; |
|
|
|
} |
|
|
|
|
|
|
|
# ========== 12. Next.js Frontend (Catch-all - Lowest Priority) ========== |
|
|
|
location / { |
|
|
|
proxy_pass http://nextjs_frontend; |
|
|
|
proxy_http_version 1.1; |
|
|
|
|