Who has a step-by-step instruction to install ASP.NET Core 3.1 on Ubuntu 20.04 with Apache which really works. The articles I have found don't.
Thanks in advance
Who has a step-by-step instruction to install ASP.NET Core 3.1 on Ubuntu 20.04 with Apache which really works. The articles I have found don't.
Thanks in advance
Hi @AaaaJeeee-6346,
You can refer the following article to install Asp.net core on Ubuntu manually:
*First, download a binary release for either the SDK or the runtime from one of the following sites. If you install the .NET SDK, you will not need to install the corresponding runtime:
Next, extract the downloaded file and use the export command to set DOTNET_ROOT to the extracted folder's location and then ensure .NET is in PATH. This should make the .NET CLI commands available at the terminal.
Alternatively, after downloading the .NET binary, the following commands may be run from the directory where the file is saved to extract the runtime. This will also make the .NET CLI commands available at the terminal and set the required environment variables. Remember to change the DOTNET_FILE value to the name of the downloaded binary:*
bash
DOTNET_FILE=dotnet-sdk-5.0.302-linux-x64.tar.gz
export DOTNET_ROOT=$(pwd)/dotnet
mkdir -p "$DOTNET_ROOT" && tar zxf "$DOTNET_FILE" -C "$DOTNET_ROOT"
export PATH=$PATH:$DOTNET_ROOT
More detail information, see Install the .NET SDK or the .NET Runtime on Ubuntu.
Then, to install the Apache, you could refer the following articles:
HOW TO HOST ASP.NET CORE APP ON UBUNTU WITH APACHE WEBSERVER
If the answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best regards,
Dillion
To host asp.net core app on Linux with Apache requires two setups
The first is start the asp.net core app on a known port. As you want to do this at startup you would typically use systemd for this. I believe Ubuntu 20 now supports systemd.
Once the asp.net core app is running, and you can access with a browser on its custom port, you now configure Apache to reverse proxy to the running asp.net core app. You will also want to set the forwarding headers asp.net core expects.
Note: if you really do not understand systemd and configuring Apache as a reverse proxy, then maybe you should not be using Linux as a host
3 people are following this question.