Maxim Dounin
September 21, 2022 06:52AM
Hello!

On Wed, Sep 21, 2022 at 06:39:25AM -0400, suryamohan05 wrote:

> We are using nginx as reverse proxy in our project. When connecting to cloud
> server, Nginx returns 401 and then 200. But when connecting to on premise
> server it is returning 401.
>
> In debug logs we are seeing SSL_get_error: 5 , SSL_get_error: 2
> SSL_get_error: -1. what does this SSL_get_error return type mean... Is there
> anyway to find the cause of this issue.

SSL_get_error() is an OpenSSL function used to retrieve status of
various SSL-related operations. It is completely unrelated to the
HTTP return codes you are seeing.

When nginx is configured as a reverse proxy, HTTP status codes
like 200 and 401 are usually returned by the upstream server, and
only proxied by nginx. First of all, you may want to make sure
that this is what happens in your case. Relevant information for
sure can be found in the debug log, or you can use the
$upstream_status variable to get the details without debugging
(http://nginx.org/r/$upstream_status). And, as long as responses
are indeed returned by the upstream server, you may want to start
looking at the upstream server instead.

Hope this helps.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

waiting for full request

mirokub September 07, 2022 09:01AM

Re: waiting for full request

Maxim Dounin September 08, 2022 10:38AM

Nginx returning 401

suryamohan05 September 21, 2022 06:15AM

Re: Nginx returning 401

Maxim Dounin September 21, 2022 06:52AM

Re: Nginx returning 401

Sergey A. Osokin September 21, 2022 09:36AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
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