Welcome! Log In Create A New Profile

Advanced

Sub Link are not working using nginx proxy

Posted by thakkarjanak 
Sub Link are not working using nginx proxy
July 13, 2021 07:36AM
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
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 187
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready