No certification check when configure nginx to work as a reverse proxy to forward from http to https

151 views Asked by At

I have two machines. both has nginx installed.

Machine A (Server): has nginx and https enabled on port 4435 with self-signed certification

enter image description here

Machine B (Client): forward requests on /site_manager uri to server A (https) on port 4435.

enter image description here

Note: I didn't install the self signed certification on machine B (Client)

When make curl from the Client B:

using nginx reverse proxy that redirect connection to machine A -> working and that isn't expected because no certificates

enter image description here

using curl request directly to machine A -> didn't work and that is expected

enter image description here

The question: Do you know why nginx able to make https even when no certifications on the machine?

1

There are 1 answers

1
Mohamed Emad Emsawy On

It seems nginx bypass/skip the certification check by default.

To enable it you have to add the following lines: enter image description here

The proxy_sl_trusted_certificate is the CA certificate that signed the target server certifications in our case that signed server (A)