0

I have been running an Apache webserver on my machine for a long while, serving various sites via https. Recently I had to install a Nginx server on the same box, and set it up to reverse proxy most requests to the Apache webserver via port 8080. I can access the sites hosted on the Apache server, but the SSL certificate in use is still the one associated with the Nginx server, not the one referred to in the Apache .conf files. How can I direct Nginx to defer to Apache's pre-configured SSL when it forwards a request?

0

How can I direct Nginx to defer to Apache's pre-configured SSL when it forwards a request?

You can't.

If nginx can't decrypt the request from the browser, it can't tell where to forward the request. You need to have valid certificates for nginx.

If apache and nginx is running on the same machine, using tls between nginx and apache is not really beneficial, as the data will be copied in memory, and never hit the actual wire.

The common way of doing this is to configure nginx to use the proper certificates for the domain, and forward requests, either in plain text or encrypted, to a backend server.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.