Following the purchase of a spangly new Toshiba laptop running Vista, and not one for making life simple, I decided not to run my development environment on IIS7, but rather, I wanted to install the latest version of Apache.
Installing Apache under Windows XP was relatively trivial. This is not the case under Windows Vista. The creation of the Apache service fails, but not overtly. Furthermore, the all-important conf directory can’t be set up by the installer, probably due to user permission problems.
I finally got it working with the following procedure. I used the latest version of Apache (2.2.4) and Windows Vista Business Edition.
- Uninstall any previous installations of Apache Web server (Start > Control Panel > Programs and Features).
Make sure that all old Apache folders are also removed (e.g. like C:\Program Files\Apache Software Foundation\…). - Turn off your firewall via the Control Panel.
- Stop User Account Control (UAC).
- Get the most recent version of Apache from http://httpd.apache.org/ and put it on your desktop, or folder of your choosing. The file I used was called apache_2.2.4-win32-x86-no_ssl.msi, but for ease, it is a good idea to rename the install file to apache.msi.
- Start > All Programs > Accessories Right-Click “Command Prompt†and choose “Run as Administratorâ€.
- Via the command prompt, navigate to the folder in which the apache.msi install file is located.
- Type “msiexec /i apache.msi†on the command prompt.

- Run through the Apache installer.









- I’m running it as a development server, so I left the domain as “localhost”.
- Choose the default server on port 80 for all users option.
- The default installation directory is C:\Program Files\Apache Software Foundation\Apache2.2\, but again for ease, you could change the installation directory to C:\Apache.
- Reboot your computer.
- The little Apache feather icon won’t appear on the task bar under Vista with the present version of Apache (2.2.4). To remove the “error†box that says blank or “the operation completed successfully†on startup, go to All Programs > Startup, and remove the “Monitor Apache Servers” item there.
- Browse to http://localhost. It should say “It works!” If it doesn’t, panick, or check your httpd.conf file by going to All Programs > Apache HTTP Server 2.2.x > Configure Apache Server > Test Configuration. Follow the directions for fixing the configuration file.
- Turn your firewall back on.
- Turn UAC back on too, if you like to be constantly bugged by control messages!
Good luck!
Tags: Apache, howto, HTTP Server, IIS 7, Install, installation, Microsoft, Vista, Web Server, windows




















32 comments
Comments feed for this article
Trackback link
http://www.simonwhatley.co.uk/installing-apache-on-vista/trackback
17 August 2007 at 6:53 am
Mark Riffey
Thanks Simon, your Apache for Vista stuff was a great help.
18 August 2007 at 8:32 pm
KnightWing19
Just wanted to say thanks the help on the Apache setup.
I was having a real pain with the install till I check this site and it worked great.
Thanks
18 August 2007 at 9:22 pm
Matt
I keep getting “The operation completed successfully” fatal error messages… after following all these steps. I have screenshots to prove it! (Actually quite funny. I wonder if they made the “success” messages a fatal error on purpose?)
18 August 2007 at 10:26 pm
Simon
The fatal error messages do seem to be a little bizarre, but I found that removing the Apache item from the startup removed such errors. I’m not sure Microsoft appreciates Apache competing so significantly well against IIS.
19 August 2007 at 6:43 pm
Martyn Dryden
Exactly the information I needed. Thank you very much.
20 August 2007 at 3:00 am
AHassan
I had a few problems at the beginning because the command prompt was at c:\windows\system32 and I couldn’t figure out how to change it to c:\users\ahassan.
But after turing the firewall and UAC off and restarting my pc, I put apache is c:\users\ahassan and it ran from there but nothing was happening, an error message came up.
So I decided to run setup manually, AND IT WORKED
Thanks
A Hassan
20 August 2007 at 2:50 pm
Martyn Dryden
Just to mention that I have now used the same technique to install MySQL, and run it as a service. Thanks again.
20 August 2007 at 3:08 pm
Simon
@Martyn Thanks.
It does appear that many applications need a similar process applied. ColdFusion also requires a similar installation technique. More on that and the MySQL setup soon.
2 September 2007 at 7:39 pm
ADIGA
nice … been trying to install it for 3 days .. never worked …
any way .. back to linux .. windows is gay :-S
8 September 2007 at 9:34 am
KPT
thanks semon …your post helped me much in configuring apache server in vista …
9 September 2007 at 12:49 pm
nadir hanid
at the moment I’m trying to install the 2.2.6 version put I download the zip file because i can’t find the msi file. But if i change the zip file to msi it doesn’t work.Well i’ not so good at technical stuff about computers since i am quite young and still at school! but i’m not thick though.I have home premium But If you know how to fix my problem then please email me at nadir_14_02@hotmail.com and show me an novice (easy) step by step instructions to install the server (remember it’s version 2.2.6 and is a zip file) please and thank you!
13 September 2007 at 8:34 pm
ayse
Thank you very much..Really helped.. but I want to learn the meaning of the command “msiexec /i ..” especially “/i” part..can you explain please??
14 September 2007 at 8:10 am
Simon
@Ayse
If you run a command prompt and type msiexec /? you will discover what all the options mean. In answer to your question though, /i is an install option for the Windows Installer that “Installs or configures a product”.
14 September 2007 at 8:16 am
Simon
@Nadir
Unless you want to compile the Apache 2.2.6 files from the source code, which I wouldn’t recommend, I suggest installing version 2.2.4 which has an MSI file. Otherwise, wait until Apache release the MSI file for 2.2.6.
12 October 2007 at 8:50 am
Danny Wilkerson
I was looking for 2.2.6 also, not sure if it’s ready or not but it’s on the webpage. You cant see it due to the section being commented out but here is the link for the source
http://www.gtlib.gatech.edu/pub/apache/httpd/binaries/win32/apache_2.2.6-win32-x86-no_ssl.msi
22 October 2007 at 7:27 pm
fc
Thanks simon, its work for me
27 October 2007 at 6:08 am
ChrisP
Thanks Simon - I wasted hours trying to instal Apache 2.2.6 until I found your site. By the way 2.2.6 is available now as a .msi file
18 November 2007 at 11:34 am
Sue
thanks _so_ much for this. I had just one little panic as I had Skype running which steals the default port. Luckily for this I’d “been there done that” with previous Apache installs and new immediately what to do. I got it working with 2.0.49 so it is at the same version as all the others I have installed.
thanks again
Sue
11 December 2007 at 4:34 pm
D Chesnut
I downloaded the .msi file. I tried to install using the command line, but could not get it to work. I then used Windows Explorer, located the .msi file and double clicked it. It installed perfectly that way.
Now, my problem is Windows Firewall. When I stop the Firewall, I can see my webpage on a remote computer. When I start Firewall, I can’t find my web page. Does anyone know a solution for this? Thanks,
Don
6 January 2008 at 4:10 pm
Sy
Thanks Simon, this worked for me on Vista HP using Apache 2.2.6 (msi file now available).
18 March 2008 at 5:56 pm
Tawa
thanks for this. i wonder if it will work on the Vista Home edition?
18 March 2008 at 7:48 pm
Simon
@Tawa. There is no reason why it should not work on Vista Home Edition since Apache does not have any special operating system components
16 May 2008 at 7:55 pm
luke mersh
hi i have followed the apache install, but i just get IIs7 when i type in localhost, any ideas?
regards
luke
2 June 2008 at 10:15 am
Anthony Greenwood
Worked exactly as you said it would. Many thanks for saving me much heartache!
2 June 2008 at 12:23 pm
Simon
@Luke is there a reason why you need to run both IIS and Apache side-by-side? I prefer not to, but if you need to, you can change the port Apache listens on to something different. Search for “Listen 80″ (without the quotes) in the httpd.conf file and change to an unused port.
20 June 2008 at 4:58 am
Amber
Browsing to http://localhost doesn’t work for me, the page can’t be displayed, but http://127.0.0.1 does. I wonder why…
20 June 2008 at 9:41 am
Simon
@amber you need to add a Virtual Host configuration to get localhost to work.
For example, place the following in the httpd.conf or httpd-vhosts.conf file, and restart the Apache service:
NB. If you want to use the httpd-vhosts.conf file, you’ll need to make sure that the line including it in httpd.conf file is uncommented.
20 June 2008 at 11:54 am
Amber
Simon, thanks for the reply, I did what you suggested and added following lines in httpd-vhosts.conf file:
NameVirtualHost *:80
DocumentRoot “C:\Apache\htdocs”
ServerName localhost
I uncommented the specified line in httpd.conf file to sync with that as well. But, still, it doesn’t work.
20 June 2008 at 2:21 pm
Simon
@amber
You need to make sure your WebRoot is in the correct place, and is referenced correctly in the httpd.conf file.
See my comment:
http://www.simonwhatley.co.uk/configuring-php-with-apache-on-windows-vista#comment-4093
3 July 2008 at 3:35 pm
Andrew
Hi Simon,
I have followed the installation steps for Apache 2.2.9 successfully and have installed and configured PHP 5.2.6 successfully. The problem exists when I shut down my note book and then start it up again Apache does not work. I have even made a copy of the original httpf.conf file and copied it into the conf folder and attempted to start Apache again but with no success. Hopefully you can help?
3 July 2008 at 4:17 pm
Simon
@Andrew have you checked whether the Apache service is running after startup? The service may not be configured to start automatically.
3 July 2008 at 10:39 pm
beginner
@amber
right click in your cmd
click on advanced and run as administrator
and apache monitor and restart ur apache and try ur localhost
cheers