Fix production deploy under /admin/ with correct Vite base path and server config.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-03 14:28:06 +02:00
co-authored by Cursor
parent a8501f4604
commit 32c15dbd1d
4 changed files with 40 additions and 4 deletions
+17
View File
@@ -0,0 +1,17 @@
# Example: admin panel at https://parche.montech.ir/admin/
# Place dist/ contents in the server path mapped to /admin/
location /admin/ {
alias /var/www/parche/admin/;
try_files $uri $uri/ /admin/index.html;
}
location ~ ^/admin/assets/ {
alias /var/www/parche/admin/assets/;
expires 7d;
add_header Cache-Control "public, immutable";
types {
application/javascript js;
text/css css;
}
}