Multiple Apache HTTPD versions in Windows

Jump to: navigation, search

If you try to install Apache HTTPD in Windows, using the MSI installer, and you already have a previous version installed, you'll get this error message

Another version of this product is already installed.
Installation of this version cannot continue.
To configure or remove the existing version of this product, use Add/Remove Programs from the Control Panel.

Now, you probably don't want to do that because you want to have side-by-side multiple versions of Apache so that you can get the new version all configured exactly how you need it before you turn off/uninstall the previous version. So here's a workaround.

1. Run this from the commandline to extract the files from the MSI:

msiexec /a apache.msi /qb TARGETDIR=c:\tmp

2. Then go to c:\tmp\program files\Apache Group\Apache2 and move that to C:\Program Files\Apache Software Foundation\Apache 2.0.63 (or whatever the current version is)

3. Copy everything in conf\ to the new conf\ folder. Don't overwrite files like magic or mime.types; we'll want the new versions of those.

4. Search and replace for references to old version number (e.g. 2.0.59) with new version number in all the .conf files

5. Make logs\ subfolder

6. Create a windows service. Run from the commandline (with your version #s):

cd C:\Program Files\Apache Software Foundation\Apache 2.0.63
bin\Apache.exe -k install -n "Apache 2.0.63"

Note: you'll have to have the bin\httpd.conf file created or copied from previous version. It will also try to start the service the too, so you have to stop the currently-running one, or change it to not listen on the ports that are already in use. See also (or corresponding docs for whatever new version you're installing)

You can run apache.exe/httpd.exe from the commandline (not as a service) while your working on the configuration. That is a lot quicker and shows startup error messages directly to you.

P.S. See also the bug reports filed about this: and