DEV Community

Install ASP.NET Core on Linux Azure Virtual Machine Ubuntu 18.04 LTS

Rebin on June 25, 2020

Introduction As we know ASP.NET Core is one of the best open source frameworks it used to build a modern web applications and that has t...
Collapse
 
ajmaly profile image
ajmaly

Hi Rebin. Thanks for the nice walkthrough. I exactly follow the same steps with our sample core app. If I browse to http://40.85.162.27/ I am getting only Welcome to nginx! page, if I try to browse http://40.85.162.27/home, I am getting 404 error. Even I tried to upload web API app and for api also I am getting 404. Could you please suggest!

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
Sloan, the sloth mascot
Comment deleted
 
rebiiin profile image
Rebin

Hi ajmaly
Make sure you don't miss any of the steps please try to deploy this simple demo github.com/4Rebin/Asp.netCoreAppDemo
Please let me know, if you face any issue.

Thread Thread
 
Sloan, the sloth mascot
Comment deleted
 
rebiiin profile image
Rebin • Edited

Things still looks good ,could you please run the following commands one by one I think the server need a restart

sudo systemctl enable appserviceunitefile.service

sudo systemctl start appserviceunitefile.service

sudo systemctl status appserviceunitefile.service

sudo systemctl restart appserviceunitefile.service

Thread Thread
 
ajmaly profile image
ajmaly

Hi Rebin, I got the reason. While creating Server block, in your command it's,

proxy_pass http://localhost Jump :5000;

I think this is typo (jump), it should be

proxy_pass http://localhost :5000;

After changing it, it's Rocks. Working!!! Thanks again for this article.

Thread Thread
 
rebiiin profile image
Rebin

Hi amaly,
I am sorry about that, now it is fixed.
Thank you for being here

Collapse
 
sakataa profile image
sakataa

Could you share me the content of /etc/nginx/sites-available/default

Collapse
 
rebiiin profile image
Rebin

Sure, here is the content of the default file.



server {
    listen 80;
    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 $http_host;
  proxy_cache_bypass $http_upgrade;
  }
}

Collapse
 
sakataa profile image
sakataa

thank you so much