Asp.net core runs on Ubuntu and coreubuntu
Environment:
- Ubuntu 16.04
- Dotnet-dev-1.0.0-preview2-003121
- Visual Studio 2015 update 3
Ubuntu installation. net core reference: https://www.microsoft.com/net/core#ubuntu
1. Add Source
sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893sudo apt-get update
2. Installation
sudo apt-get install dotnet-dev-1.0.0-preview2-003121
3. Upload the program to the/home/zulin/dotnet directory.
Release
Run restore and run
dotnet coredemo.dll
4. Configure the nginx proxy
# Install sudo apt-get install nginx
# Configure sudo nano/etc/nginx/sites-available/default # add it to the backend server {# Port and domain listen 8080; server_name aspnet. local; # Path to the wwwroot folder root/home/zulin/dotnet/wwwroot; # Pass requests to Kestrel location/{proxy_pass http: // 127.0.0.1: 5000; proxy_set_header Connection ""; proxy_http_version 1.1 ;}}
# Restart sudo service nginx restart
Now you can view it in the browser.
Http://xxx.xxx.xxx.xxx: 8080