solve nginx error! signin-oidc 502 bad gateway dotnet core and identity server

Mahdi Shanak
Aug 27, 2017 · 1 min read

first

sudo vi /etc/nginx/nginx.conf

and add

http{...proxy_buffer_size   128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
large_client_header_buffers 4 16k;
...
}

then in

sudo vi /etc/nginx/conf.d/default.conf

add

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;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;

}

)

Mahdi Shanak
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade