Proxy problem is killing me

Saint Michael venefax at gmail.com
Sat Jun 18 10:53:43 UTC 2022


I am writing code to proxy a news website and it works
but the top line shows the original site, not my own site.
the code  is attached:
The idea is that the person who needs to go to
https://novosti.dn.ua
goes instead to
https://novosti.oneye.us
What am I doing wrong?
many thanks
Philip
-------------- next part --------------
server {
default_type  application/octet-stream;
set $template_root /usr/local/openresty/nginx/html/templates;
listen 8.19.245.6:443 ssl;
error_log logs/error.log warn;
access_log logs/access.log;
server_name  novosti.oneye.us;
ssl_certificate /etc/letsencrypt/live/novosti.oneye.us/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/novosti.oneye.us/privkey.pem;
location / {
proxy_cookie_domain https://novosti.dn.ua/ https://novosti.oneye.us;
resolver 8.8.8.8 ipv6=off;
proxy_set_header Accept-Encoding "";
proxy_buffering on;
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_ssl_server_name on;
proxy_http_version 1.1;
proxy_set_header Accept-Encoding "";
proxy_set_header User-Agent $http_user_agent;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host novosti.dn.ua;
proxy_pass https://novosti.dn.ua;
proxy_redirect https://novosti.dn.ua https://novosti.oneye.us;
 
subs_filter_types text/css text/javascript application/javascript;
subs_filter "https://novosti.dn.ua" "https://novosti.oneye.us" gi;
subs_filter "https://novosti.dn.ua" "https://novosti.oneye.us" gi;
subs_filter "novosti.dn.ua" "novosti.oneye.us" gi;

            }
    }


More information about the nginx mailing list