1

We have an Angular app and a Back-end web API on .NET core. Both sites should be served over HTTPS. I currently have one Linux server.

Currently I'm planning to host my Angular app on a domain (for example: https:// example.com) in nginx, all API calls are made using same domain with /api endpoint (for example: https:// example.com/api), and from nginx server I'm redirecting to .NET core Kestrel server.

Is this deployment good for a real production environment? If anyone has better ideas, please let me know. Thanks.

PS: obtaining another public IP isn't a problem.

mforsetti
  • 2,488
  • 2
  • 14
  • 20
mbdow
  • 9
  • 2
  • ip 10.x.x.x - http://exampleangular.com - angular app ip 11.x.x.x -http://examplewebapi.com . making two public ip and domains and listening. which option is better. – mbdow Nov 18 '20 at 05:50

2 Answers2

1

According to Krestel official documentation is a good practice to use a reverse proxy. The implementation doc is good and it goes into more details about it: https://docs.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel?view=aspnetcore-5.0

If only one frontend server is powerful enough to maintain your workload I don't see any problem with that.

Bluekat
  • 136
  • 5
1

It's most of the time a good idea to reverse proxy applications and it's default behaviour in the most setup. It gives you flexibility, maintainability and security as well.

schmichri
  • 377
  • 2
  • 9