Installing Apache on Vista

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.

  1. 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\…).
  2. Turn off your firewall via the Control Panel.
  3. Stop User Account Control (UAC).
  4. 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.
  5. Start > All Programs > Accessories Right-Click “Command Prompt” and choose “Run as Administrator”.
  6. Via the command prompt, navigate to the folder in which the apache.msi install file is located.
  7. Type “msiexec /i apache.msi” on the command prompt.

    Apache Install Command Prompt

  8. Run through the Apache installer.

    Apache Install Step 1

    Apache Install Step 2

    Apache Install Step 3

    Apache Install Step 4

    Apache Install Step 5

    Apache Install Step 6

    Apache Install Step 7

    Apache Install Step 8

    Apache Install Step 9

  9. I’m running it as a development server, so I left the domain as “localhost”.
  10. Choose the default server on port 80 for all users option.
  11. 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.
  12. Reboot your computer.
  13. 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.
  14. 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.
  15. Turn your firewall back on.
  16. Turn UAC back on too, if you like to be constantly bugged by control messages!

Good luck!


Bookmark:

  • Digg
  • del.icio.us
  • Technorati
  • StumbleUpon
  • Google
  • Ma.gnolia
  • YahooMyWeb
  • Facebook
  • Reddit
  • BlinkList
  • blogmarks
  • Fark
  • Furl
  • Simpy
  • Slashdot
  • Spurl
  • Wists
  • NewsVine
  • Pownce

Tags: , , , , , , , , ,

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.

Danny Wilkerson

Danny Wilkerson’s avatar

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:

<VirtualHost *:80>
    DocumentRoot "C:/WebRoot"
    ServerName localhost
</VirtualHost>

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