title: resources not found with asp.net core 3.1 + linux nginx (static files problem?)
body: <p>I'm trying to run an app asp.net core 3.1 MVC on my raspberry pi 4.
  The app with its resources files (img, css...) works fine on IIS debug mode (windows).</p>
  
  <p>I followed this tutorial to set up the linux environment : <a href="https://edi.wang/post/2019/9/29/setup-net-core-30-runtime-and-sdk-on-raspberry-pi-4" rel="nofollow noreferrer">tuto</a>
  The app starts well in linux but no resource on pages.</p>
  
  <p>So I checked microsoft doc pages about Static files : <a href="https://docs.microsoft.com/en-us/aspnet/core/fundamentals/static-files?view=aspnetcore-3.1" rel="nofollow noreferrer">Static Files</a>
  and others tuorials. Mostly, they explain how to change the resources directory path but this is not my problem. I just would like see it works with wwwroot first.</p>
  
  <p>I didn't changed anything in startup.cs as you can see :</p>
  
  <pre><code>public class Startup
  {
      public Startup(IConfiguration configuration)
      {
          Configuration = configuration;
      }
  
      public IConfiguration Configuration { get; }
  
      // This method gets called by the runtime. Use this method to add services to the container.
      public void ConfigureServices(IServiceCollection services)
      {
          services.AddControllersWithViews();
      }
  
      // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
      public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
      {
          if (env.IsDevelopment())
          {
              app.UseDeveloperExceptionPage();
          }
          else
          {
              app.UseExceptionHandler("/Home/Error");
              // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
              app.UseHsts();
          }
          app.UseHttpsRedirection();
          app.UseStaticFiles();
  
          app.UseRouting();
  
          app.UseAuthorization();
  
          app.UseEndpoints(endpoints =&gt;
          {
              endpoints.MapControllerRoute(
                  name: "default",
                  pattern: "{controller=Home}/{action=Index}/{id?}");
          });
      }
  }
  </code></pre>
  
  <p>Neither in program.cs : </p>
  
  <pre><code>public class Program
      {
          public static void Main(string[] args)
          {
              CreateHostBuilder(args).Build().Run();
          }
  
          public static IHostBuilder CreateHostBuilder(string[] args) =&gt;
              Host.CreateDefaultBuilder(args)
                  .ConfigureWebHostDefaults(webBuilder =&gt;
                  {
                      webBuilder.UseStartup&lt;Startup&gt;();
                  });
      }
  </code></pre>
  
  <p>nginx config file content :</p>
  
  <pre><code>server {
      listen        80 default_server;
      server_name   _;
      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;
      }
  }
  </code></pre>
  
  <p>Do you have any idea, please, how to fix it?
  Thanks for reading this :)</p>