Hello Team,
My requirement is when I open the url "https://nginx.cloudexpert.guru/" it should redirect to the "https://www.devopstechlab.com"
That is working with my configuration. But once the link is opened if I click on page like Know Us, Contact then sub link are not working. It jist give message "This site can’t be reached"
Below is my configuration.
server {
server_name nginx.cloudexpert.guru;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
sub_filter 'href="https://devopstechlab.com/' 'href="https://nginx.cloudexpert.guru/';
sub_filter 'img src="https://devopstechlab.com/' 'img src="https://nginx.cloudexpert.guru/';
sub_filter 'href="https://www.devopstechlab.com/' 'href="https://www.nginx.cloudexpert.guru/';
sub_filter 'img src="https://www.devopstechlab.com/' 'img src="https://www.nginx.cloudexpert.guru/';
proxy_pass https://www.devopstechlab.com/;
sub_filter_types *;
sub_filter_once off;
include /etc/nginx/mime.types;
proxy_set_header Accept-Encoding ""; # no compression allowed or next won't work
try_files $uri $uri/ =404;
}
}
Can anyone help me here or suggest me either this is possible with nginx proxy. I don't want that end use knows that URL is related with Devops Techlab. In url part I need nginx.cloudexpert.com url only
Thank You