Welcome! Log In Create A New Profile

Advanced

Re: 502 Bad Gateway using Cloudflare and Kestrel

Francis Daly
September 04, 2023 04:06AM
On Sun, Sep 03, 2023 at 09:57:54PM -0700, Sam Hobbs wrote:

Hi there,

> curl -k https://127.0.0.1:5443
>
> (the address that Kestrel is listening to) I get a page that I am expecting.

> proxy_passhttp://127.0.0.1:5443;

You probably have a space after proxy_pass in your actual config; but
you probably should also have "https://" not "http://" there as well,
since your upstream service is listening for https connections.

> Is there a way to determine with relative certainty that the 502 is caused
> by something in nginx and not Cloudflare or Kestrel or the application? Is
> there a way to get more details? If someone knows how to fix the problem
> regardless of where and why it is happening then that would be great help.

The nginx error log should show its description of what it thinks is
happening; you can change the logging level to have more details written,
if that will help diagnose things.

And the port-5443 service should log something like "I got a http request
to a https port" wherever it writes its information.

Cheers,

f
--
Francis Daly francis@daoine.org
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

502 Bad Gateway using Cloudflare and Kestrel

SimpleSamples September 04, 2023 01:00AM

Re: 502 Bad Gateway using Cloudflare and Kestrel

Francis Daly September 04, 2023 04:06AM

Re: 502 Bad Gateway using Cloudflare and Kestrel

SimpleSamples September 04, 2023 11:12AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 188
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready