Author Topic: Redirect subdomain to specific internal Server/IP  (Read 1531 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Redirect subdomain to specific internal Server/IP
« on: August 26, 2020, 09:31:57 AM »
Hi,

I am pretty new to CWP7 and couldn't find how to redirect some sub-domain to another web server in my network.
Is that even possible to do?

The thig is that I have registered few domains, everything works fine as each domain and subdomain points to a directory on CWP7 web server, but I need that some subdomain doesn't point to CWP7's local directory, but to another server in my network, for example:
https://myserver2.mydomain.com should point to web server on host: 192.168.1.200...

Any help on how to do this would be greatly appreciated.

Thank you.

Offline
*
Re: Redirect subdomain to specific internal Server/IP
« Reply #1 on: August 26, 2020, 07:56:55 PM »
you simply need to edit local dns or host file on your system...all depends on what kind of setup is that exactly.
If this is a public domain and you have routing to the server private ip then you can't do domain custom redirect but you can setup in webservers conf proxy configuration for that subdomain.
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Redirect subdomain to specific internal Server/IP
« Reply #2 on: August 30, 2020, 07:39:54 PM »
Hi,

Thank you for your answer, but I still can't figure out what needs to be done so my subdomain will be forwarded to different internal IP.

I have my own DNS, CWP7 machine is configured to use it, and if I try pinging myserver2.mydomain.com, CWP7 machine returns 192.168.1.200.
But I just can't figure out how to set up a subdomain of myserver2.mydomain.com that will forward http/https requests to a different local web server with IP 192.168.1.200...

Thanks again.

Offline
*
Re: Redirect subdomain to specific internal Server/IP
« Reply #3 on: September 01, 2020, 10:44:36 PM »
Hey,

Just letting everyone interested in know, that I've solved the issue by setting up HAProxy in front of CWP.
It defaults to CWP host, and all other special forwards are defined there...