I’m trying to host an ASP.net core MVC app on Linux using Nginx. I managed to host a sample MVC app without User authentication, but when I wanted to host one with Identity built in, it results with http 500 internal server error.
The app is running, the nginx codes are ok. Help me out here.
I’m hosting on command only debian operating system.
This is my nginx/sites-available/default configuration
server {
listen 80;
server_name example.com *.example.com;
location ~ ^/(css/|lib/|js/|favicon.ico/){
root /var/www/aspnetcoreapp/wwwroot;
access_log off;
expires max;
}
location / {
proxy_pass http://127.0.0.1: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;
}
}