Windows 7上的本地主机

我想在Windows 7上启用本地主机,以便能够在没有远程服务器的情况下使用Chrome构build网站。 我想不要安装任何东西,并能够,例如,导航到http://localhost/something/somethingElse/index.html

任何人都知道?

为了在Windows 7上激活本地主机服务器,请导航到:

 -> Control Panel -> Programs and Features -> Turn Windows features on or off 

然后搜索Internet信息服务并检查其复选框。

等待Windows进行更改,不需要立即重新启动,服务器将被启用。

您现在可以导航到

 127.0.0.1 

要么

 http://localhost 

有一个简单的扩展名“200 OK” 。 在localhost上运行一个web服务器。

  • 自定义端口设置
  • 选择你的项目文件夹并启动服务器

在这里输入图像说明