0
votes

I have an Angular 5 app which is setup on a domain using Plesk.

In order to work properly (to be able to refresh the app when is inside a route) I know I have to put some nginx directives under Websites & Domains >> Apache & nginx Settings for [my.domain.name] >> Additional nginx directives

Does anyone know them.

In theory something is needed to mask the URL (Angular is using routes on fake url which do not exist on the server and nginx is trying to solve them at refresh without success)

1

1 Answers

3
votes

This is what I've added into Websites & Domains >> Apache & nginx Settings for [my.domain.name] >> Additional nginx directives to make it work as desired

location ~ ^/ {
    try_files $uri $uri/ /index.html;
}

enter image description here