Windows may be the most notorious thing there is, but after a few years of patches and service packs, I have to admit that even Microsoft Windows Vista has become very stable. If I do not update my Vista, I can often manage to go without rebooting for as long as necessary. That gave me the idea: how about setting up Vista a Webserver?

Actually, I have not tried using Vista to form a server for the internet (yet). But I have managed to setup a webserver for development and my university LAN.

Basics

It was easy enough. I simply downloaded the pre-bundled MySQL, PHP (with PHPMyAdmin) and Apache from http://www.wampserver.com/en/ and installed it.

One thing that one needs to be aware of is that installing it in the C:\ drive of Vista is not a good idea because of all the complications of Vista’s new Access Control Lists regime. If you do install it in drive C:\ (the default installation drive for all Windows I know of), you must take ownership of the whole folder where you install the WampServer. Also, it is advisable not to have spaces in the full installation path - not perhaps necessary, but certainly advisable.

Done…?

Everything should now be working (if you installed it in some other drive than C:, it should have been very easy). Simply start up WampServer from the Start Menu entry, open up a browser, and enter http://localhost/
This should show you the default WampServer page.

…not necessarily yet

Unfortunately, I had another complexity. Pointing to localhost gave me no results but pointing to 127.0.0.1 did. Technically, localhost should be bound to the IP I just mentioned, but it was not. After a few minutes of pinging and net trawling, I found out what was wrong.
The Vista Hosts file (\Windows\System32\drivers\etc\) does not do the binding properly (well, not at least how we want it).
So take ownership of the file (right click > Properties > Security > Advanced > Ownership > change to your username), open it in Notepad and make sure the last line only says “127.0.0.1 localhost”. There should be no “::1″ or anything of that kind. Then save it and close the file.

WampServer, ready to use

There you are. WampServer ready to roll: simply build your site in the wamp\www\ folder, or if you feel a little more tweaky, mess with the httpd config file to change it (the menu in the Notification Area is a wonderful thing…)

Share/Save/Bookmark