Localhost on Windows 7

2019-03-12 04:07发布

问题:

I want to enable a localhost on Windows 7 to be able to build websites with Chrome without a distant server. I would like to not install anything, and be able to, for example, navigate to http://localhost/something/somethingElse/index.html.

Anyone knows how?

回答1:

In order to activate localhost server on Windows 7 navigate to:

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

Then search for Internet Information Services and check its checkbox.

Wait for Windows to make the changes, no need for immediate restart, the server will be enabled.

You can now navigate to

127.0.0.1 

or

http://localhost


回答2:

There is a simple chrome extension "200 OK". Which runs a web server on localhost.

  • Custom port settings
  • Choose your project folder and start the server