我希望在Windows 7上启用本地主机,能够使用Chrome构建网站而无需远程服务器。我不想安装任何东西,并且希望能够访问例如http://localhost/something/somethingElse/index.html
。
有人知道怎么做吗?
我希望在Windows 7上启用本地主机,能够使用Chrome构建网站而无需远程服务器。我不想安装任何东西,并且希望能够访问例如http://localhost/something/somethingElse/index.html
。
有人知道怎么做吗?
为了在Windows 7上激活本地服务器,请导航至:
-> Control Panel -> Programs and Features -> Turn Windows features on or off
然后搜索Internet Information Services并勾选它的复选框。
等待Windows进行更改,无需立即重新启动,服务器将被启用。
现在,您可以导航到
127.0.0.1
或者http://localhost
C:/inetpub/wwwroot
中的内容用于 http://localhost/
,因此,如果您不想深入设置,只需将文件放在该文件夹中即可。 - Aaron Campbellhttp-server
,您需要安装Windows版本的NodeJs并执行npm install http-server
。之后,您可以使用http-server -p 8080
将任何文件夹变为Web服务器,并运行多个实例。 - Sasi Varunan