From e61065cd346a06ece81f390df627fd138aaa0579 Mon Sep 17 00:00:00 2001
From: migudel <miguel.moras@estudiantes.uva.es>
Date: Sun, 1 Dec 2024 19:21:58 +0100
Subject: [PATCH] Arreglo SPA

---
 angular/RestClient/Dockerfile        | 2 +-
 angular/RestClient/nginx-custom.conf | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/angular/RestClient/Dockerfile b/angular/RestClient/Dockerfile
index 22f1432..3557c5f 100644
--- a/angular/RestClient/Dockerfile
+++ b/angular/RestClient/Dockerfile
@@ -19,7 +19,7 @@ FROM nginx:alpine AS production
 
 # Copiar los archivos de construcción generados en la etapa anterior a la carpeta de Nginx
 COPY --from=build /app/dist/app/browser /usr/share/nginx/html
-COPY --from=build-step /app/*.conf /etc/nginx/sites-available/default
+COPY --from=build /app/nginx-custom.conf /etc/nginx/conf.d/default.conf
 
 # Exponer el puerto 80 para Nginx
 EXPOSE 80
diff --git a/angular/RestClient/nginx-custom.conf b/angular/RestClient/nginx-custom.conf
index a560219..fd070b2 100644
--- a/angular/RestClient/nginx-custom.conf
+++ b/angular/RestClient/nginx-custom.conf
@@ -1,8 +1,10 @@
 server {
   listen 80;
+
+  root /usr/share/nginx/html;
+  index index.html;
+  
   location / {
-    root /usr/share/nginx/html;
-    index index.html index.htm;
     try_files $uri $uri/ /index.html =404;
   }
 }
\ No newline at end of file
-- 
GitLab