I have a server that gets all requests from 3 different domain names. I would like to reroute two of the domain in another local IP.
Actually I have :
And I would like to get :
But I don't know how to do that, any idea, software/script name on debian ?
Thanks !
You can use proxy for what you expect and multiply configuration to manage all port needed. Following config will proxy all request for: subdomain.abc.com:80 => 192.168.0.70:80
server {
listen 80;
server_name subdomain.abc.com;
location / {
proxy_pass http://192.168.0.70:80;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
Unfortunately according to the documentation port number can't be dynamic and should be hard coded on your configuration file.