NGINX and Angular 2

前端 未结 4 903
Happy的楠姐
Happy的楠姐 2020-12-05 11:06

My current app users routes like this /myapp/, /myapp//, /myaapp/dept/

My app is currently deployed in an internal http server with NGINX. The other server that acce

4条回答
  •  广开言路
    2020-12-05 11:07

    I was also having problems here, this is now contemplated in the angular docs: https://angular.io/guide/deployment

    NGinx: use try_files, as described in Front Controller Pattern Web Apps, modified to serve index.html:

    try_files $uri $uri/ /index.html;

提交回复
热议问题