From the course: Deploying ASP.NET Core Applications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use Kestrel with NGINX

Use Kestrel with NGINX

From the course: Deploying ASP.NET Core Applications

Start my 1-month free trial

Use Kestrel with NGINX

- [Instructor] It's common for Linux servers to use Nginx as a lightweight reverse proxy. I'll show you how to setup Nginx and configure it to forward requests to Kestrel. One way to do this easily on Ubuntu is with the Nginx PPA source. If I do sudo add-apt-repository ppa:nginx/stable, and then sudo apt-get update, and finally sudo apt-get install nginx, I can verify that Nginx installed successfully by doing sudo service nginx start. Nginx runs in the background, so if I go over to another machine and use the IP address of this machine in a web browser and try to browse it, I should see the default Nginx splash page. Nginx serves this page when everything is configured correctly, but there's nothing for it to point to. Now we need to configure Nginx. In order to edit the Nginx configuration, I need to move to /etc/nginx/sites-available/. There's a file called default here, which is the default configuration, I'm gonna make a backup of this real quick, nv copy it to default.backup…

Contents