L
L
lex2019-09-24 14:25:16
Nginx
lex, 2019-09-24 14:25:16

How to handle ssl on both nginx and apach?

Good evening)
Please help me understand how to configure nginx and apache so that you can enter ssl certificates there and there.
Now it turns out that port 443 is processed by apache and when setting up nginx, listening to 443 for a certain domain with its own settings does not work.
there are different resources and one of them with a working certificate on Apache - there is also a resource being processed by nginx, it is not possible to make a certificate there

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Andrey, 2019-09-24
@VladimirAndreev

Only one web server can listen on one port.

A
Alexey Dmitriev, 2019-09-24
@SignFinder

Leave nginx as a frontend, and transfer apache as a backend and proxy the necessary traffic from nginx to apache.
And SSL certificates are universal - they can be used everywhere after adjusting the formats.

A
Andrey Gavrilov, 2019-09-24
@thexaver

I would advise using nginx + php-fpm in general, it will be even faster

V
Viktor Taran, 2019-09-24
@shambler81

nginx      80 --> 82     apache  
nginx+ssl  443 -> 4443 apache +ssl

what they write in the manuals on the Internet is 100% wrong ifa because they
offer such an option
nginx      80 --> 82     apache  
nginx+ssl  443 -> 80 apache + эмулировать что это https

and even if this can be partially done by changing the protocol in the referee, but the same ajax on the back will definitely not know about it, like .htaccess, etc., etc., so this is the original hat.
do a full front and back with the same keys so that it works without problems.
Mogud give working examples of configs.
nginx
config apache config

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question