diff --git a/nginx.conf b/nginx.conf index f914abb..d4e08bf 100644 --- a/nginx.conf +++ b/nginx.conf @@ -4,11 +4,13 @@ server { root /usr/share/nginx/html; index index.html; - location / { - try_files $uri $uri/ /index.html; + location /info/ { + alias /usr/share/nginx/html/; + try_files $uri $uri/ /info/index.html; } - location /assets { + location /info/assets/ { + alias /usr/share/nginx/html/assets/; expires 1y; add_header Cache-Control "public, immutable"; } diff --git a/vite.config.ts b/vite.config.ts index 0506f1b..9223f5e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,6 +6,7 @@ import {defineConfig, loadEnv} from 'vite'; export default defineConfig(({mode}) => { const env = loadEnv(mode, '.', ''); return { + base: '/info/', plugins: [react(), tailwindcss()], define: { 'process.env.GEMINI_API_KEY': JSON.stringify(env.GEMINI_API_KEY),