问题
I have to configure a staging site of my web application in Windows Server 2016.
I have ASP.net site which is running smoothly in my win server 2016, and I have configured A record from my bluehost DNS Manager.
My Question: I want to add a new site in the IIS of my server using same port. So how I could manage to reach it from A record or CNAME record from bluehost?
回答1:
As far as I know, IIS doesn’t allow two websites to use the same port number when we using the same alias for the local machine.
To create a unique binding, we need to specify another name(HostName) for the second website. Edit the binding and specify the unique hostname the user will address to.
Now, we can start the second website as well.
All we have to do is to add an alias for the server(A or CNAME) to DNS that specifies the IP address or the name of your web server.
Here is a related discussion.
http://woshub.com/run-multiple-websites-on-the-same-port-and-ip-address-on-iis/
Feel free to let me know if there is anything I can help with.
来源:https://stackoverflow.com/questions/61890199/configure-2-sites-in-the-iis-of-windows-server-2016