It’s best practice for ASP.NET Core applications to have a “real” webserver in front of them. We’ll configure NGINX for the job using Ansible. We don’t hate all best practices. ASP.NET Core applications have a built-in webserver called Kestrel. This internal webserver is not intended to serve requests directly. It must be placed behind a production quality webserver such as NGINX, IIS, etc. We chose NGINX because we have experience with it and it runs on Linux. Ansible does all the needed configuration and keeps our servers consistent and predictable.
Configure NGINX with Ansible
Everything we need can be accomplished from a single playbook. This playbook installs NGINX, configures it, copies SSL keys and enables the ASP.NET Core site:
Request Metrics is application monitoring for the front-end. Understand your real
users, and how they experience your application. Fix the bugs and problems that get
in the way of your users. Respond to outages and attacks quickly with Request Metrics.
Get visibility into your web app in minutes instead of months.