Installing Apache on Vista
Posted on Wednesday, 8th August 2007 in Development by Simon
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!
Thanks Simon, your Apache for Vista stuff was a great help.
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
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?)
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.
Exactly the information I needed. Thank you very much.
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
Just to mention that I have now used the same technique to install MySQL, and run it as a service. Thanks again.
@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.
nice … been trying to install it for 3 days .. never worked …
any way .. back to linux .. windows is gay :-S
thanks semon …your post helped me much in configuring apache server in vista …
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!
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??
@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”.
@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.
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
Thanks simon, its work for me
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
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
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
Thanks Simon, this worked for me on Vista HP using Apache 2.2.6 (msi file now available).
thanks for this. i wonder if it will work on the Vista Home edition?
@Tawa. There is no reason why it should not work on Vista Home Edition since Apache does not have any special operating system components
hi i have followed the apache install, but i just get IIs7 when i type in localhost, any ideas?
regards
luke
Worked exactly as you said it would. Many thanks for saving me much heartache!
@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.
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…
@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.
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.
@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
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?
@Andrew have you checked whether the Apache service is running after startup? The service may not be configured to start automatically.
@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
when I open the command prompt I get C:\Windows/system32>
I can’t do anything after that. I have the apache.msi on my desktop. How do I “navigate” to it so I can install it? what am I supposed to type? I tried “cd apache.msi” at the end and it didn’t work. Help please.
@jonathan to navigate to your desktop you can do the following:
On Windows XP:
C:\Windows\system32>cd\
C:\cd Documents & Settings
C:\Documents & Settings>cd *USERNAME*
C:\Documents & Settings\*USERNAME*>cd desktop
On Windows Vista:
The user profile is found in the C:\Users directory.
[...] Simon Whatley’s instructions, making sure to [...]
to all vista users:
I’m trying to find all of these tutorials I can, but YOU CANNOT INSTALL AN APACHE TESTING SERVER ON VISTA….PERIOD!
If you “trick” vista and get Apache to work, it will eventually crash (when this happens depends) and you will have to reinstall vista and lose all data unless backed up.
Hope this helps someone.
Thanks a lot Mr. Simon. I am using window vista business and the step by step Apache installations has worked greatly. This is 50 % off relief the configurations I am making for Joomla in my machine.
Great! Thanks, I even thought to change my windows back to xp because of this fault – but now its working,
I did this as presented, with cmd in admin mode, but it will not create the service at the end of the install.
I have no idea what goes wrong.
I successfully installed it once using a different tutorial, but I decided to install it to a different directory and now I can’t get it working with any tutorial, even if I go back to default directory. Apache seems to have everything proper except the service.
i’m able to see my web server going here in web browser:
http://localhost:8080/
but when i try to access outside of my network:
http://myIPaddress:8080/
connection just times out.
I set up port forwarding on my router like this (NOTE: I set up TCP and UDP individually b/c when I try BOTH, I get Port Overlap error ):
Name: Apache1
External: 8080
Internal: 8080
Protocol: TCP
IP: A static IP that I created
Enabled: YES
Name: Apache2
External: 8080
Internal: 8080
Protocol: UDP
IP: A static IP that I created
Enabled: YES
I installed Apache Tomcat 6 w/defaults. Do I need to change Apache config? Is it possible my ISP is blocking port?
Many thanks Simon for your wonderful hints. Please, I have the same problem with Amber (comment 4092) – my localhost does not work but the IP address does. I pasted the code below into my httpd.conf file but the problem persists!!!
DocumentRoot “C:/apache/htdocs”
ServerName localhost
What else do I need to do please?
Beside, if I use “c:/apache” as the path for the document root, the page would not even load at all, except using “c:/apache/htdocs”.
Many thanks
@steve you need to make sure you have a virtual host definition like the following. It is essentially a catch-all defintion for the localhost server name. Ideally you’d not have this, but would rather set up a virtual host for each project or site you were working on so you can set up individual profiles etc.
Remember to restart Apache for changes to take effect.
@dave First, make sure the firewall on your local machine allows for port 80 and 443 traffic. Second, make sure the DNS on your network knows where to look for the domain, or put the IP address of your computer into the Windows Hosts file on all the computers that need to access the website. Thire, set up a virtual host profile that looks like an actual domain, for example with a server name domain.local (where ‘domain.local’ can be anything you choose) — you will need to know this for the hosts file as well.
Below is an example VirtualHost:
For example, I have a local copy of WordPress on my computer, which I use to develop themes. I would typically reference the local install as
http://wordpress.local/so it has a ‘proper’ URL structure.It says “It works!”, but when I click on the “feather” icon…the black window pops up and goes away. Anyone know why? Please help me! This is for class. If you can e-mail me, I would be so grateful.
i try it now. I hope success
Thanks Simon, this worked perfectly!
Hello, I had a same problem like Amber and Steve, but anything you mentioned guys didn’t help me. I have read about a file “hosts” occuring in “windows\system32\drivers\etc” and I found something was wrong. I have Windows Vista, but I think it may happen to anyone with WinXP too. There were 2 lines defining localhost in this file:
127.0.0.1 localhost
::1 localhost
I just added “#” before the second line and now everything go right
That’s all I have to say.
Have a nice day
Hi
I made what u said but not on your version of apache, it did not work, it coudent navigate to the localhost
is it necessary to download your version
I visited the apache site but I did not Know how to install apache 2.2.4.
I did not understand what they want.
thanks for help
thank’s a lot
do you prefer. putting apache directory on program files or new folder on C?
For avoid any dump and error?