I have a asp .net core app running on Linux using Kestrel.
It binds to the ip ok on port 80.
But the nginx reverse proxy site needs to host the app under a non-r
OK - so 2 things had to be done to get the app running under a "virtual directory":
Inside the startup configure method I had to set the basepath for the app AND specify a path for the static files.
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
...
app.UseStaticFiles("/myapp");
app.UsePathBase("/myapp");
...
}
The app also runs from / as well - not sure if this is desirable but its not a big issue for me right now.