Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
I’ve followed this several times now and I have an issue where when I visit my domain, it times out on https://www.my-domain.com:5001. The service is running, dotnet is running and is listening on 5000 and 5001, and nginx is configured (going to server IP shows nginx default screen). From what I can tell, the server block is configured properly. What could I be missing?
Is there any possibility to run all this thing in Docker with SDK, runtime and nginx image.
Note: On your deployed application you do NOT want to have any passwords or user secrets in your source code, and certainly not on version control (git)
I had some issues where the server would intermittently timeout (~1/min) and a websocket error would appear in the console. After extensive research I finally figured out that the line:
proxy_set_header Connection keep-alive;
should actually be
proxy_set_header Connection "upgrade";
in /etc/nginx/sites-available/your-domain
The keep-alive will reconnect when it fails (which makes it usable), but it will regularly fail because even though you set header Upgrade to $http_upgrade, sometimes the header will not be "upgrade" during transport. The above change ensures this value will not change.
There is a typo. While navigating to systemsd step, it is given as
cd /etc/systemd/systems
But it is,
cd /etc/systemd/system
Its not systems, but system. Spent 0.5 hrs wondering why I could not find that folder :(
cd /etc/systemd/systems should be cd /etc/systemd/system I think.
You need to make a small correction to the instruction to edit the service. It should be:
cd /etc/systemd/system
You have it as:
cd /etc/systemd/systems
I added following under site-available file. Prior to adding this, got 404 for js, css, images
location ~* /(css|js|lib|fonts|media) { root /var/www/your-app/html/wwwroot; }
As the date of of today this tutorial is broken. As dotnet 2.1 is not supported anymore and .net 5 is the new way to go. It still usefull but I didn’t manage to install up to the point of creating the db with entity framework the entity framework part is broken the rest still works. Plus I didn’t manage to make the entity framework dotnet ef migration works on Ubuntu server 20.04 LTS still Investagating how I can resolve my issues. As I need to deploy my application on a Linux production server If I’m losing too much time configuring I may consider switching technologies all together as python and django are more straight forward regarding set up on Linux… I like the .net framework but if it is still a configuration hell with broken part and dependency hell… I might ass well wait until it is ready and mature technology.
I was able to get this tutorial to work with Core 3.1 with a few minor updates. Here are the changes (mostly aggregating feedback from other comments):
switch sdk install to: sudo apt install dotnet-sdk-3.1
Core 3.1 split out an EF package from the SDK, so you need to install it manually, since it isn’t there by default anymore: dotnet tool install –global dotnet-ef
Fix a port 5001 timeout issue. Forwarded headers, from https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-3.1, to quote mikeg70:
From the Microsoft documentation above, the only new edit you will need to apply is in the Startup.cs file. Add the following code in your Configure method
using Microsoft.AspNetCore.HttpOverrides; …
app.UseForwardedHeaders(new ForwardedHeadersOptions { ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto });
Add the following nuget package to your .NET project: Microsoft.AspNetCore.HttpOverrides –version 2.2.0 through VS UI or command line: dotnet add package Microsoft.AspNetCore.HttpOverrides –version 2.2.0
My application is using Postgres so I didn’t test the MySQL stuff, but I wouldn’t suspect that has changed.