Best way to run ASP.Net under Linux :
STEP 1 - GET A CHEAP HOST
I went to Linode (or anywhere) and got the cheapest Linux machine they offered. In this case, it's an Ubuntu 14.04 LTS Profile, 64-bit, 4.6.5 Kernel.
STEP 0.5 - SETUP A USER THAT ISN'T ROOT
It's always a good idea to avoid being root. After logging into the system as root, I made a new user and give them sudo
STEP 1 - GET .NET CORE ON YOUR LINUX MACHINE
Head over to get .NET Core and follow the instructions. There are at least 8 Linuxes supported in 6 flavors so you should have no trouble. I followed the Ubuntu instructions.
STEP 2 - MAKE AN ASP.NET CORE WEBSITE
You can make an ASP.NET Core website that is very basic and very empty and that's OK. You can also get Yeoman and use the ASP.NET yeoman-based generators to get more choices.
STEP 3 - EXPOSE YOUR WEB APP TO THE OUTSIDE.
I
could tell Kestrel - that's the .NET Web Server - to expose itself to Port 80, although you
usually want to have another process between you and the outside world.
You can do this in a
few ways. You can open the Program.cs with an editor like "pico" and add a .UseUrls() call to the WebHostBuilder like this.
STEP 4 - SETUP A REVERSE PROXY LIKE NGINX
I'm following the detailed instructions at the ASP.NET Core Docs site called "Publish to a Linux Production Environment." (All the docs are on GitHub as well)
I'm going to bring in Nginx and start it.
Remember the relationships.- Dotnet - runs your website
- Nginx or Apache - Listens on Port 80 and forwards HTTP calls to your website
- Supervisor - Keeps your app running
Next, I might want to set up a continuous integration build, or SCP/SFTP to handle the deployment of my app. That way I can develop locally and push up to my Linux machine.
these are some way you can run ASP.Net under Linux?