Welcome! Log In Create A New Profile

Advanced

Proxy problem is killing me

Saint Michael
June 18, 2022 06:56AM
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
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;

}
}_______________________________________________
nginx mailing list -- nginx@nginx.org
To unsubscribe send an email to nginx-leave@nginx.org
Subject Author Posted

Proxy problem is killing me

Saint Michael June 18, 2022 06:56AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 74
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready