0

I have two web servers with different domain and only one public IP. I found that I can multi domain in the same IP and same server as bellow, but I would to open the website depending on the domain. I tried

server {
    listen       80;
    server_name  first.domain.com;
    return 301 http://192.168.1.10;
}

but this configuration change the url to http://192.168.1.10 ! I want to see the https://first.domain.com/request rather than http://192.168.1.10/request

m3asmi
  • 101
  • 1
  • 1
    Does this answer your question? [Nginx Redirect via Proxy, Rewrite and Preserve URL](https://serverfault.com/questions/586586/nginx-redirect-via-proxy-rewrite-and-preserve-url) – djdomi Jun 10 '22 at 16:51
  • looks like what I'm looking for, Thank you @djdomi – m3asmi Jun 11 '22 at 20:43

0 Answers0