inadmissible

Multiple Apache services on Windows

December 28th, 2005

Yesterday I’ve tried to add multiple Apache services on my Windows PC. Each of these services will use their own configuration file. One of the possibilities of different configuration files is that you can use different versions of the PHP module (eg. 4.3.x, 4.4.x and 5.x) while using only one Apache installation.

By default, Apache 2 will be installed under C:\Program Files\Apache Group\Apache2. If you let the installer also register a Windows service, C:\Program Files\Apache Group\Apache2\conf\httpd.conf will be used as the configuration file for a service called “Apache2″.

I went searching for the available command line options of the apache executable with
> "C:\Program Files\Apache Group\Apache2\bin\Apache.exe" -h

You can register a new Windows service for Apache with the following command:
> "C:\Program Files\Apache Group\Apache2\bin\Apache.exe" -f file -n name -k install
where file is the full path to the configuration file you want to use, and name the name for the new Windows service.

Running Apache as a service is also a topic in the official Apache documentation.

Entry Filed under: Apache httpd

1 Comment Add your own

  • 1. Thierry  |  June 8th, 2007 at 1:35 pm

    If you have Apache 2.2 you should use the command:
    > “C:\Program Files\Apache Group\Apache2\bin\httpd.exe” -f file -n name -k install

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

December 2005
M T W T F S S
    Jan »
 1234
567891011
12131415161718
19202122232425
262728293031  

Most Recent Posts