I'm running Angular 5 and had to, according to the env build, change the index.html
. So I went with multiple "apps":
declaration inside angular-cli.json
, where --app=0
has dev envs and --app=1
has prod envs.
The --app=1
has "index": "index.prod.html"
.
When I deploy and go my domain I get:
I'm using nginx and my default.conf
has
server {
...
root /usr/share/nginx/html;
location / {
autoindex on;
try_files $uri $uri/ /index.html;
index index.html index.htm;
}
...
}
And I came across the thought that nginx is failing to get my proper index.html
that is named as index.prod.html
(as seen inside my dist folder), and falling to nginx.html.
The problem I'm running through is that I need to support index.html
and index.prod.html
, cause I have different envs and I can deploy them as well.
How can I achieve that? Thanks.