HTTP 497 nginx Plain HTTP to HTTPS Port
nginx uses the internal code 497 when it receives a regular HTTP request on a port configured to expect HTTPS. The default error path can present HTTP 400, and an operator can configure an error page or redirect for the internal status.
Check the URL and the upstream scheme
A client that opens http://example.com:443/ can send plaintext to a TLS listener. The same mistake can happen behind a proxy when the incoming connection uses HTTPS but the reverse proxy forwards plaintext to an upstream TLS port.
Trace the protocol on each leg
Compare the public URL with the scheme and port configured for the upstream. Confirm where TLS terminates and which service listens on that socket. For a proxy client, check the destination scheme separately from the protocol used to connect to the proxy itself. Review proxy and destination protocols.
A reverse proxy can change the protocol between hops
Imagine an HTTPS site behind a reverse proxy that sends requests to http://backend.example.com:8443. If the backend listener on 8443 expects TLS, it receives ordinary HTTP on a secure port and nginx can take the 497 error path. Check the configured upstream address, scheme and actual listener together. If you administer the service, test the listener with the protocol it expects and confirm the intended TLS policy on the backend connection.
Interpret the browser's status alongside nginx logs
A browser can display 400 while an nginx configuration or error handler works with 497 internally. Review the gateway and origin entries for the same timestamp or request ID. If your site uses a redirect for HTTP requests that reach the HTTPS listener, check the redirect destination to avoid sending clients to the same wrong scheme. If the request followed an HTTP proxy tunnel, the tunnel's status and the target-side exchange are separate. Read the stages of a proxy test result.