Хочу настроить обратный прокси для сайта udemy.com, что-то типа зеркала. Тренируюсь на локальной машине 192.168.56.103.
Сайт открывается, но почему-то не весь контент прогружается.
Так же на сайте есть поддомены about.udemy.com business.udemy.com. Что с ним делать? Как их проксировать? Допустим у хоста 192.168.56.103 появился свой домен host1.com. Все поддмены надо явно в конфиге прописывать или можно как-то по-хитрому это сделать в конфиге?
Мой конфиг
root@debian:/etc/nginx/sites-available# cat reverse-proxy.conf
server {
listen 80;
location / {
proxy_pass https://www.udemy.com;
proxy_set_header Accept-Encoding "";
subs_filter "udemy.com" "192.168.56.103" gi;
subs_filter "www.udemy.com" "192.168.56.103" gi;
proxy_cookie_domain www.udemy.com 192.168.56.103;
proxy_set_header Accept-Encoding "";
proxy_ssl_server_name on;
proxy_buffer_size 64k;
proxy_buffers 4 64k;
proxy_busy_buffers_size 64k;
}
}
В логах nginx'a
2020/06/30 02:07:54 [error] 1043#1043: *6 connect() to [2606:4700::6810:5b34]:443 failed (101: Network is unreachable) while connecting to upstream, client: 192.168.56.1, server: , request: "GET /staticx/udemy/js/webpack/udlite-common-css.c95fd7689fd2991b5d6c.css HTTP/1.1", upstream: "https://[2606:4700::6810:5b34]:443/staticx/udemy/js/webpack/udlite-common-css.c95fd7689fd2991b5d6c.css", host: "192.168.56.103", referrer: "http://192.168.56.103/"
2020/06/30 02:07:54 [error] 1044#1044: *8 connect() to [2606:4700::6810:5c34]:443 failed (101: Network is unreachable) while connecting to upstream, client: 192.168.56.1, server: , request: "GET /staticx/udemy/js/webpack/discover.4f395c5d736d884d2124.css HTTP/1.1", upstream: "https://[2606:4700::6810:5c34]:443/staticx/udemy/js/webpack/discover.4f395c5d736d884d2124.css", host: "192.168.56.103", referrer: "http://192.168.56.103/"
2020/06/30 02:07:54 [error] 1044#1044: *8 connect() to [2606:4700::6810:5b34]:443 failed (101: Network is unreachable) while connecting to upstream, client: 192.168.56.1, server: , request: "GET /staticx/udemy/js/webpack/discover.4f395c5d736d884d2124.css HTTP/1.1", upstream: "https://[2606:4700::6810:5b34]:443/staticx/udemy/js/webpack/discover.4f395c5d736d884d2124.css", host: "192.168.56.103", referrer: "http://192.168.56.103/"
2020/06/30 02:07:54 [error] 1043#1043: *5 connect() to [2606:4700::6810:5c34]:443 failed (101: Network is unreachable) while connecting to upstream, client: 192.168.56.1, server: , request: "GET /staticx/udemy/js/webpack/home/desktop/hb.d6f43dc56be3016f6505.css HTTP/1.1", upstream: "https://[2606:4700::6810:5c34]:443/staticx/udemy/js/webpack/home/desktop/hb.d6f43dc56be3016f6505.css", host: "192.168.56.103", referrer: "http://192.168.56.103/"