B
B
bamond2016-02-15 12:18:49
Nginx
bamond, 2016-02-15 12:18:49

How to configure website proxying in nginx?

Good afternoon.
Is it possible to set up SSL proxying of a site through nginx? The task is the following, for example, we
prescribe in the hosts of the machine 127.0.0.1 habrahabr.ru
on the localhost we raise nginx and say:

server {
        listen         127.0.0.1 ;

        server_name habrahabr.ru;

        location / {

        proxy_pass http://$http_host$request_uri;
        proxy_set_header Host $http_host;
        resolver 8.8.8.8;

        }


}

In the case of http it works fine... but not in the case of https.
Error "
SSL connection error
ERR_SSL_PROTOCOL_ERROR"
Can I somehow proxy https?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Romanenko, 2016-02-15
@slimus

where is listen 443?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question