Answer the question
In order to leave comments, you need to log in
Why can't I set up a reverse proxy for the site?
I want to set up a reverse proxy for the udemy.com site, something like a mirror. I am training on the local machine 192.168.56.103.
The site opens, but for some reason not all content is loaded.
The site also has subdomains about.udemy.com business.udemy.com. What to do with him? How to proxy them? Let's say the host 192.168.56.103 has its own domain host1.com. All poddmeny must be explicitly registered in the config, or can it be done somehow in a cunning way in the config?
My config
[email protected]:/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;
}
}
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/"
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question