简体   繁体   English

更改IIS域URL

[英]Change IIS domain url

I have a deployed web application on my local IIS (7.0) and is working perfectly. 我在我的本地IIS(7.0)上部署了一个Web应用程序,并且运行正常。 Since it's on my local, it is accessible via http://<>/webapp/index.aspx. 因为它在我的本地,它可以通过http:// <> /webapp/index.aspx访问。 Now, what I am trying to achieve is to access it on a custom url ie http://www.someuniqueweburl.com , and will make sure that it doesn't exist on the internet and of course, can only be accessed when you are on the same network with the local IIS web server. 现在,我想要实现的是在自定义URL(即http://www.someuniqueweburl.com)上访问它,并确保它不存在于互联网上,当然,只有在您访问时才能访问与本地IIS Web服务器位于同一网络上。 Is this achievable? 这可以实现吗?

Thanks a bunch! 谢谢你!

You need some kind of DNS service to achieve this. 您需要某种DNS服务才能实现此目的。

You may : 你可以 :

  • register a DNS entry in your local network DNS Server, if you have one. 在本地网络DNS服务器中注册DNS条目(如果有)。 Then all your network should be able to sample.custom.url.com to your IP address 然后,您的所有网络都应该能够将sample.custom.url.com发送到您的IP地址

  • or add an entry line to your %windir%\\System32\\drivers\\etc\\hosts file : 或者在%windir%\\ System32 \\ drivers \\ etc \\ hosts文件中添加一个输入行:

    127.0.0.1 sample.custom.url.com 127.0.0.1 sample.custom.url.com

    but you will be the only one able to resolve sample.custom.url.com . 但你将是唯一一个能够解析sample.custom.url.com的人。 Other machines will need a similar entry in their hosts file (with your network ip address, instead of 127.0.0.1) 其他机器在其hosts文件中需要一个类似的条目(使用您的网络IP地址,而不是127.0.0.1)

  1. Open IIS Manager. 打开IIS管理器。 For information about opening IIS Manager, see Open IIS Manager (IIS 7). 有关打开IIS管理器的信息,请参阅打开IIS管理器(IIS 7)。
  2. In the Connections pane, expand the Sites node in the tree, and then select the site for which you want to configure a host header. 在“连接”窗格中,展开树中的“站点”节点,然后选择要为其配置主机标头的站点。
  3. In the Actions pane, click Bindings. 在“操作”窗格中,单击“绑定”。
  4. In the Site Bindings dialog box, select the binding for which you want to add a host header and then click Edit or click Add to add a new binding with a host header. 在“站点绑定”对话框中,选择要为其添加主机标头的绑定,然后单击“编辑”或单击“添加”以使用主机标头添加新绑定。
  5. In the Host name box, type a host header for the site, such as www.contoso.com. 在“主机名”框中,键入站点的主机标头,例如www.contoso.com。 Click OK. 单击确定。
  6. To add an additional host header, create a new binding with the same IP address and port, and the new host header. 要添加其他主机标头,请创建具有相同IP地址和端口以及新主机标头的新绑定。 Repeat for each host header that you want to use this IP address and port. 对要使用此IP地址和端口的每个主机标头重复此操作。

I got this from the Microsoft technet website: Configure a Host Header for a Web Site (IIS 7) 我从Microsoft technet网站获得了这个: 网站配置主机头(IIS 7)

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

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