0

I'm setting up an Angular Universal application with Express in IIS, with a reverse proxy as described in this article https://dev.to/petereysermans/hosting-a-node-js-application-on-windows-with-iis-as-reverse-proxy-397b. If i set my IIS site up as http://example.com with a rewrite url to http://localhost:4000/{R:1} (node application is listening on 4000) everything is working fine.

I would like to use a subsite in IIS, for example http://example/abc, so I set up an application under my website called abc which has the abovementioned rewrite rule. Now when I browse to http://example.com/abc the browser is trying to load js/css files from http://example.com, which leads to 404 errors. Am I doing something wrong? I've set up Angular sites as subsites in IIS previously (not Universal), which correctly loads js/css files.

Nait
  • 1,055
  • 1
  • 14
  • 19

1 Answers1

1

Try using the --deploy-url option when doing a build

ng build --prod --deploy-url /abc
David
  • 33,444
  • 11
  • 80
  • 118