M
M
mts20502017-01-04 21:48:32
Nginx
mts2050, 2017-01-04 21:48:32

How to set up https on apache+nginx?

Apache+Nginx.
Worth OpenSSL.
In apache config:
ssl.conf:

Listen 443 https
<VirtualHost _default_:443>
</VirtualHost>
httpd.conf:
Listen 127.0.0.1:8888
In the nginx configuration:
set $proxyserver "http://127.0.0.1:8888";
Everything is fine with the http protocol and the site is served via nginx+apache, https via apache.
How to correctly change the configuration so that https works through nginx + apache? Or both protocols worked through nginx+apache (but this is not critical because there will still be a redirect).
If I change like this:
In the apache configuration:
ssl.conf:
Listen 127.0.0.1.443 https
<VirtualHost 127.0.0.1:443>
</VirtualHost>
httpd.conf:
Listen 8888
In nginx config:
set $proxyserver "https://127.0.0.1:443";
Will it work?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
OnYourLips, 2017-01-04
@mts2050

No need to configure https on apache.
Set it to nginx only, and work with apache through proxy_pass.
It's even easier to completely abandon Apache.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question