I have started trying to self host some projects to get a better understanding of the Networking/Hosting principles and I have been having an issue with hosting a .NET CORE app in Visual Studio following the Razor MVVM pattern.
Main question is, is this even possible or does it need to be on Windows Server?
I initially wanted to create two websites off the same domain ie game.domain.com and api.domain.com.
I have one .net core API working so if I go to api.domain.com/swagger/index.html I can see my controllers and all that works fine. However, I thought since I wrote the Razor facing app with .net core as well, I could also host that on the same Ubuntu server with NGINX.
So right now I have two nginx sites setup in folders
- /var/www/api.domain.com/html
- /var/www/twerkle.domain.com/html
Inside each of the html folders, I have a basic index file that gets served as a dummy landing page just to prove I can get to either site through the public IP and it routes it via NGINX. However, I can not seem to get the twerkle.domain.com page to show the main razor .cshtml page.
I followed this link to get the Services setup so it runs the dotnet on the folder's and have the two services running and listing.
Ubuntu Services running
Every tutorial or documentation that I have seen has mainly been in regards to .net core apps utilizing them as an api.
Here shows the basic index.html landing page being displayed.
TwerklePage