简体   繁体   English

IIS在A记录上有多个网站子域-映射抛出404错误

[英]IIS multiple website subdomains on A record - mapping throws 404 error

I have hosting with 1 IP, and multiple A records assigned to that IP. 我拥有1个IP的主机,并为该IP分配了多个A记录。

Example: 例:

IP of hosting: 主机IP:
123.123.123.123 123.123.123.123

This is how I have dns records assigned with domain registrar: 这就是我为域名注册商分配的dns记录的方式:

  • 123.123.123.123 A test.domain.com 123.123.123.123 A test.domain.com
  • 123.123.123.123 A stackoverflow.domain.com 123.123.123.123 A stackoverflow.domain.com
  • 123.123.123.123 A hello.domain.com 123.123.123.123 hello.domain.com

Now I have multiple websites in IIS. 现在,我在IIS中有多个网站。 To have different subdomains binded to different websites all I should do is to bind subdomain: 要将不同的子域绑定到不同的网站,我要做的就是绑定子域:

http://puu.sh/gvznZ/fab84bde4e.jpg http://puu.sh/gvznZ/fab84bde4e.jpg

But the problem is, that when I do this website on assigned port stops working, but when I visit a website with assigned subdomain like in a picture it gives me: 但是问题是,当我在分配的端口上运行此网站时,该网站停止工作,但是当我访问具有分配的子域的网站(如图片所示)时,它会给我以下信息:
http://i.stack.imgur.com/3fvOc.png http://i.stack.imgur.com/3fvOc.png

Do I have to assign more settings to directory or something? 我是否需要为目录或其他内容分配更多设置?

Edit 编辑
Ok found out that http://bo.domain.com:777/ works. 确定发现http://bo.domain.com:777/可以正常工作。 But how do I remove this port? 但是如何删除该端口?

Multiple websites can use the same port as long as they have distinct domain bindings. 多个网站可以使用同一端口,只要它们具有不同的域绑定即可。 You can use port 80 for all (and avoid needing to type a port in the browser address), just make sure you edit the bindings for each IIS website and specify the correct domain. 您可以对所有端口使用端口80(并避免在浏览器地址中键入端口),只需确保编辑每个IIS网站的绑定并指定正确的域即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM