How To Run Apache HTTP Web Server as a Windows Service with FireDaemon
Apache HTTP Web Server is a widely-used web server. The web server can be run as a Windows Service using FireDaemon for extended functionality. FireDaemon will allow you to have the web server start automatically at boot prior to login, allow you to start multiple instances of the web server and so forth. This HOWTO will show you how set it up. You can also use Trinity or PanelDaemon to manage FireDaemon and other Windows services via a web browser.
Apache comes with its own windows service but if it crashes, it only restarts after 1 minute. With FireDaemon, you can have it restart a second after it crashes! So make sure you disable the Apache2.2 service before setting up an Apache service with FireDaemon.
Apache HTTP Web Server Setup Under FireDaemon
Download the latest Apache HTTP Web Server from here
By default Apache HTTP Web Server installs to "C:\Program Files\Apache Software Foundation\Apache2.2\" so for the purposes of this HOWTO, we will use that directory.
Install FireDaemon Pro into the directory of your choice (typically C:\Program Files\FireDaemon). FireDaemon can be downloaded from here.
Apache HTTP Web Server has many executables in its bin directory, but only one of them can be used to start the web server (httpd.exe).
Next start the FireDaemon GUI from the desktop shortcut. Click on the "Create a new service definition" button in the toolbar (or type Ctrl+N) and enter the information into the fields as you see below. Obviously adjust paths to suite your installation. Pay special attention to the Parameters list.
For executable, point it to: C:\Program Files\Apache Software Foundation\Apache2.2\bin\httpd.exe
For working directory, point it to the bin directory: C:\Program Files\Apache Software Foundation\Apache2.2\bin
Now click on the Advanced tab. You can change the Process Priority to allocate more CPU time to Apache HTTP Web Server or specify which CPU or core Apache HTTP Web Server will run on (in the case of multi-processor, hyperthreaded or multi-core CPUs).
You must change the "Job Type" to "Global Job", otherwise when Apache is restarted the child process will not be terminated properly.
Now click on the Dependencies tab. Make sure the service depends on the lanmanworkstation (Workstation) service to ensure the TCP/IP and CIFS stacks are both up prior to starting the Perl script.
Now click on the Install button to install and start your Web Server!