Linux serverlinux web serverNETWORK ADMINISTRATIONS

How to deploy .net core website in linux | Hosting .net core website in ubuntu using nginx server

#deploy_asp.net_core_in_linux
Hi there, in this video I have described how to install nginx server and how to deploy asp .net core web app in linux machine. For this i have used nginx server as a reverse proxy server and asp .net mvc core for creating a web app.
Topics covered in this video:
How to deploy .net core app in linux.
How to install nginx server in linux machine.
===========================================================
Content inside default.config file:
server {
listen 80;
server_name example.com *.example.com;
location / {
proxy_pass http://localhost:5000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection keep-alive;
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}

content inside app.service file:
————–
[Unit]
Description= mvcnew webapp
[Service]
WorkingDirectory=/var/www/app1
ExecStart=/usr/bin/dotnet /var/www/app1/mvcnew.dll
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
SyslogIdentifier=mvcnew
Environment=ASPNETCORE_ENVIRONMENT=Production

[Install]
WantedBy=multi-user.target

…………………………………………………………..

Previous videos:
1. Asp.Net Core MVC Web App CRUD with EF Core

2. How to use SQL-Server with VS Code in Ubuntu.

Other links:
Angular tutorials and projects: https://bit.ly/3DitqDp
dot net 6 tutorial and project: https://bit.ly/3MSrXGX
dot net core series: https://bit.ly/3TolF4i
dot net 6 projects: https://bit.ly/3zpn9ng
……………………………………………….
connect with me
Twitter: https://twitter.com/ravi_devrani
GitHub: https://github.com/rd003
Youtube: https://www.youtube.com/channel/UCzTMzmLbuEWOUmpzo9vaV7Q
……………………………………
Become a supporter:
You can buy me a coffee: https://www.buymeacoffee.com/ravindradevrani
……………………………………………….
connect with me
Twitter: https://twitter.com/ravi_devrani
GitHub: https://github.com/rd003
Youtube: https://www.youtube.com/channel/UCzTMzmLbuEWOUmpzo9vaV7Q
……………………………………
Become a supporter:
You can buy me a coffee: https://www.buymeacoffee.com/ravindradevrani

source

by Ravindra Devrani

linux web server

20 thoughts on “How to deploy .net core website in linux | Hosting .net core website in ubuntu using nginx server

  • How can we host multiple web api in nginx using same elestic ip

  • What about adding postgres?

  • Thank you, very good tutorial 🙂

  • MSBUILD : error MSB1003: Specify a project or solution file. The current working directory does not contain a project or solution file.

  • Hi. I want to use the path like this localhost/{appName}. I dont want to use default root localhost. How can I do this? Thanks 🙂

  • Great! Can't we deploy it without any reverse proxy like nginx or apache? We know reverse proxy handles queuing mechanism. Is there any alternative for handling queuing mechanism without using reverse proxy?

  • Now, how do I connect to SQL Server hosted in Windows? 😂 Looking for work around but still no luck..

  • Tank you,But can you show in a video ,How can I configure litespeed for hosing asp.net core ?Tank you

  • Hello i am new in UBUNTU but old in Microsoft Technologies, i am making a project in Ngnix + UBUNTU + SQLserver, I am using the AUTHETICATION TYPE – Individual Accounts, and works fine in local machine (Windows) i have a server in cloud Ubuntu + Ngnix + SQL server, and works fine, i can create the users i check the creation its OK in the database, but when i try to login the site just redirect to the home page and dont showme the user email, like the local machine. Any idea ?

Comments are closed.