diff --git a/web/dashboard/nginx.conf b/web/dashboard/nginx.conf index 04d93ff..72f3123 100644 --- a/web/dashboard/nginx.conf +++ b/web/dashboard/nginx.conf @@ -1,7 +1,7 @@ server { listen 80; server_name localhost; - root /usr/share/nginx/html/dashboard; + root /usr/share/nginx/html; index index.html; # Gzip compression @@ -17,9 +17,9 @@ server { try_files $uri =404; } - # SPA routing - todo desde la raíz del contenedor - location / { - try_files $uri $uri/ /index.html; + # SPA routing - todas las rutas con prefijo /dashboard/ + location /dashboard/ { + try_files $uri $uri/ /dashboard/index.html; } } diff --git a/web/landing/src/components/Hero.astro b/web/landing/src/components/Hero.astro index 585f41b..bf8bf20 100644 --- a/web/landing/src/components/Hero.astro +++ b/web/landing/src/components/Hero.astro @@ -54,7 +54,7 @@
Empezar gratis diff --git a/web/landing/src/pages/index.astro b/web/landing/src/pages/index.astro index 1de8373..5b2b955 100644 --- a/web/landing/src/pages/index.astro +++ b/web/landing/src/pages/index.astro @@ -3,17 +3,13 @@ import Layout from '../layouts/Layout.astro'; import Hero from '../components/Hero.astro'; import Features from '../components/Features.astro'; import Platforms from '../components/Platforms.astro'; -import HowItWorks from '../components/HowItWorks.astro'; import Pricing from '../components/Pricing.astro'; -import CTA from '../components/CTA.astro'; --- - - diff --git a/web/nginx.conf b/web/nginx.conf index 2182d8f..31825d8 100644 --- a/web/nginx.conf +++ b/web/nginx.conf @@ -33,6 +33,15 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } + # Assets estáticos del dashboard + location ~ ^/dashboard/.*\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + rewrite ^/dashboard/?(.*)$ /$1 break; + proxy_pass http://dashboard:80; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + # Dashboard Vue - reescribir /dashboard/* a /* en el contenedor location /dashboard/ { # Quitar el prefijo /dashboard antes de pasar al contenedor @@ -46,6 +55,14 @@ server { proxy_set_header X-Forwarded-Proto $scheme; } + # Assets estáticos del landing (raíz) + location ~ ^/.*\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + proxy_pass http://landing:80; + proxy_http_version 1.1; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + # Landing page (Astro) - raíz location / { proxy_pass http://landing:80;