Настройка реверс-прокси для сайта

nixxx nginx-forum на forum.nginx.org
Вт Июн 30 13:36:34 UTC 2020


настриваю обратный прокси для сайта https://www.on-running.com/, хочу
сделать что-то типа зеркала. 
тренируюсь на локальной машине 192.168.56.103. сервер вечно шлет мне
редиректы, когда я пытаюсь зайти на сайт. в чем может быть проблема?
Вот конфиг сервера:
server {
    listen 80;
    location / {
        proxy_pass https://on-running.com;
        proxy_set_header      Host     on-running.com;
        subs_filter "on-running.com" "192.168.56.103" gi;
        subs_filter "www.on-running.com" "192.168.56.103" gi;
        proxy_cookie_domain www.on-running.com 192.168.56.103;
        proxy_cookie_domain on-running.com 192.168.56.103;
        proxy_set_header Accept-Encoding "";
        proxy_redirect https://on-running.com http://192.168.56.103;
        proxy_redirect https://www.on-running.com http://192.168.56.103;
        proxy_ssl_server_name on;
    }
}
Редиректы
~  curl http://192.168.56.103 -I 
HTTP/1.1 301 Moved Permanently
Server: nginx/1.14.2
Date: Tue, 30 Jun 2020 13:31:33 GMT
Connection: keep-alive
Cache-Control: max-age=3600
Expires: Tue, 30 Jun 2020 14:31:33 GMT
Location: http://192.168.56.103/
cf-request-id: 03a7060cb20000f2cce7b89200000001
Expect-CT: max-age=604800,
report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
CF-RAY: 5ab83f8defeef2cc-WAW

Posted at Nginx Forum: https://forum.nginx.org/read.php?21,288500,288500#msg-288500



Подробная информация о списке рассылки nginx-ru