http/ssl for nginx and apache virtual host

Viewed 34

I have apache ssh server, currently it works correctly.

This works

https://exmaple.com/

Then now, I want to introduce nginx as reverse-proxy,

what I want to do next is

pass access https://example.com:8080 to apache.

For now my setting is like this below.

server{
        listen 8080 default_server;
        listen [::]:8080 default_server;
        server_name examle.com;
        location / {
            proxy_pass  https://127.0.0.1:443/;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Proto $scheme;
    }
}

then,

http://example.com/ it works

https://example.com shows ERR_SSL_PROTOCOL_ERROR

I am confused.

SSL certification document is installed in apache already.

However I need to set this in nginx as well?

0 Answers
Related