如何设置子域上的IIS 7 [英] How to set up subdomains on IIS 7
问题描述
我有一个网站的坐着IIS 7的服务器上:
WWW.example.COM
I have a website sitting on an IIS 7 server: WWW.example.COM
我想创建一个看起来像几个子域
SUBDOMAIN1.example.COM
I would like to create several sub domains that looks like SUBDOMAIN1.example.COM
我创建了一个IIS网站,我设置绑定为
HTTP,端口80,我的服务器的IP地址,SUBDOMAIN1.example.COM下一个文件夹的物理路径的 example.COM
I created an IIS website and I set the bindings to be http, port 80, the ip address of my server, and SUBDOMAIN1.example.COM and the physical path to a folder under example.COM
我重新启动我的网站,并点击浏览,浏览器不是与地址打开:
http://SUBDOMAIN1.example.COM
I restarted my website and clicked on browse, the browser than opened with the address: http://SUBDOMAIN1.example.COM
但该网站没有显示出来。
But the website doesn't show up.
我必须做的DNS的东西吗?
Do I have to do something with the DNS?
推荐答案
这一次让我抓狂......基本上你需要两样东西:
This one drove me crazy... basically you need two things:
1)确保你的DNS设置是指向你的子域。这意味着,以确保您的DNS为你的子域名,并指向同一个IP有一条A记录。
1) Make sure your DNS is setup to point to your subdomain. This means to make sure you have an A Record in the DNS for your subdomain and point to the same IP.
2)您必须在IIS 7中添加其他网站名为subdomain.example.com
2) You must add an additional website in IIS 7 named subdomain.example.com
- 网站>添加网站
- 站点名称:subdomain.example.com
- 物理路径:选择子域目录
- 绑定:相同的IP example.com
- 主机名:subdomain.example.com
这篇关于如何设置子域上的IIS 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!