Assign a subdomain to iis server 8

0

Dear,
I have two websites on an iis 8 server with windows server 2012. I also have a separate web hosting (with CPanel), from which I get a dns for one of the webs hosted on my IIS (web1.domain.com). I recently made the second web I have on the IIS server and I need to assign another dns coming from my web hosting, something like web2.dominio.com.

On the IIS server I have separated the two websites by the port, that is:

Web1 - > 123.45.67.8:80
Web2 - > 123.45.67.8:81

As you know, the port can not be set in the DNS settings in CPanel and I require that the first web be kept unchanged since it is currently being used.

How can I create the redirection correctly, so that I can access web2 with web2.domain.com?

I remain attentive.

    
asked by Israel jara 04.07.2017 в 23:57
source

1 answer

1

Well, doing tests I have already been able to solve it and I think that publishing the answer can be useful for someone else.

What I did was to place both websites on port 80 by modifying the links by right clicking on the respective sites of my IIS and selecting "modify links" . There also make the modification of the host placing as host name "web1.domain.com" and "web2.domain.com" respectively.

Finally, in CPanel assign both dns to the same IP , being IIS responsible for identifying which URL you want to enter and redirecting to the corresponding website.

I hope someone can find this information useful.

    
answered by 06.07.2017 в 18:34