fix: corrigir nginx do front para usar index.csr.html
This commit is contained in:
parent
ced67a02b4
commit
a5b850ac06
|
|
@ -3,9 +3,14 @@ server {
|
|||
server_name _;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
index index.csr.html;
|
||||
|
||||
# Angular SSR static browser build uses index.csr.html as the SPA entrypoint.
|
||||
location = /index.html {
|
||||
try_files /index.csr.html =404;
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
try_files $uri $uri/ /index.csr.html;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,25 @@ cd ~/apps/line-gestao-api
|
|||
docker compose -f docker-compose.domain.yml up -d caddy
|
||||
```
|
||||
|
||||
|
||||
## 404 no domínio após build (caso comum neste projeto)
|
||||
|
||||
Se o container `frontend-nginx` subir, mas `https://linegestao.inglinesystems.com.br` continuar em 404, valide:
|
||||
|
||||
```bash
|
||||
# 1) arquivo de entrada do build Angular SSR
|
||||
ls -lah ~/apps/line-gestao-frontend/dist/line-gestao-frontend/browser/index.csr.html
|
||||
|
||||
# 2) recarregar Nginx do front após atualizar config
|
||||
cd ~/apps/line-gestao-frontend
|
||||
docker compose -f docker-compose.frontend.yml up -d --force-recreate frontend-nginx
|
||||
|
||||
# 3) testar origem do Nginx localmente no VPS
|
||||
curl -i http://127.0.0.1:8081/
|
||||
```
|
||||
|
||||
Neste repositório, o Nginx do front deve apontar para `index.csr.html` (e não `index.html`).
|
||||
|
||||
---
|
||||
|
||||
## Bloco C — validação (curl + navegador)
|
||||
|
|
|
|||
Loading…
Reference in New Issue