Run Apache HTTP Server As A Windows Service
Share
While working with a JDE EnterpriseOne add-on application, I needed to install the Apache HTTP Server as a Windows Service so that it would start automatically when rebooted. The command I used is:
httpd.exe -k install -n "MyHTTPServer_WindowsServiceName"
I got it from this Apache HTTP Server documentation:
Using Apache HTTP Server on Microsoft Windows
The relevant test is:
You can install Apache as a Windows NT service as follows from the command prompt at the Apache bin subdirectory:
httpd.exe -k install
If you need to specify the name of the service you want to install, use the following command. You have to do this if you have several different service installations of Apache on your computer. If you specify a name during the install, you have to also specify it during any other -k operation.
httpd.exe -k install -n “MyServiceName”
If you need to have specifically named configuration files for different services, you must use this:
httpd.exe -k install -n “MyServiceName” -f “c:\files\my.conf”
If you use the first command without any special parameters except -k install, the service will be called Apache2.4 and the configuration will be assumed to be conf\httpd.conf.
Author
Stewart Schatz
More Stories
Quick Tip: Determine Active Directory Account Status From The Windows Commandline
Use the following command to Determine Active Directory Account Status from the Windows Commandline without Powershell or any special software....
Windows God Mode… What!?!
Windows God Mode is a hidden feature in the Windows operating system that allows users to access all of the system’s control panel options and settings in a single place.
A Better SMTP Test
Several years ago, I posted about an SMTP Test that I was using. Well, lately, I've needed something with a...
How To Kill All Processes With The Same Name On Windows
The taskkill command can be used many different ways to end or kill running processes on Windows Server 2012 and...
Monitor a Log File While It Is Being Written To Using The PowerShell Tail Parameter
Recently, I had a client with a process that was out of control. The logs kept getting too large, too...
Server Manager Agent Not Connecting To SMC
After a Java update, the server manager agent may not connect to the SMC because of parameters in the java.security...
Average Rating