githubEdit

Deploy APIs on Nginx webserver in Ubuntu

Deploy OM_Dashboard and RM_Dashboard APIs on nginx (ec2: Ubuntu Server)

Steps:

  1. Update and upgrade the system:

sudo apt update && sudo apt upgrade -y
  1. Then install dot-net (required version). In my case, I am using 8.0.

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y dotnet-host
sudo apt-get install -y dotnet-sdk-8.0
sudo apt install -y aspnetcore-runtime-8.0
sudo apt install -y dotnet-runtime-8.0
sudo apt update 

In case you're getting conflict, you can also use:

sudo apt-get install apt-transport-https
sudo apt-get update 
sudo apt-get install -f -y dotnet-host 
sudo apt-get install -f -y dotnet-sdk-8.0
sudo apt install -f -y aspnetcore-runtime-8.0
sudo apt install -f -y dotnet-runtime-8.0
sudo apt update
sudo apt upgrade -y 
  1. Check the dot-net version and info:

  1. Get the file:

Method: git, wget, scp

  1. Now config and give the path to the OM_Dashboard zip file:

  1. Now config and give the path to the OM_Dashboard zip file:

  1. Both should have exe and dll. (Choose the dll with name of exe)

  2. Let's create the service to deploy OM_Dashboard api first.

Now turn for RM_Dashboard

  1. Check enable, start and check status of both services

  1. Time to install nginx too:

  1. Enable and check status of nginx service

  1. Let's config the nginx server:

For new default file:

  1. Now check the nginx file syntax/ status and reload nginx server:

Note: These sites aren't accessible now but you can try your hosted URL as per your given location.

Last updated