Create Virtual Host in IIS 7

本文介绍如何在本地计算机上配置虚拟主机。首先需修改C:WindowsSystem32driversetc目录下的hosts文件,添加虚拟主机与IP地址的映射。接着,在IIS7中创建新的网站,并在Visual Studio中设置项目的Web属性,使用自定义Web服务器并指定服务器URL。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

/*By Jiangong SUN*/


1. Add your ideal host name in your local machine

GO to C:\Windows\System32\drivers\etc

Modify your "hosts" file as administrator 

Add your mapping line with your virtual host and your machine IP  

ex :  10.20.12.102      local.test.jiangong.com


2. Create a new website in IIS7 




3. Modify your project property in Visual studio 

Click "Web" tab, then "Use Custom Web Server", and type your hostname in "Server Url"


Now, you can browse your web site in your IIS7 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值