Using Apache2.4
I could able to start the server and listen on port 8080 through powershell or cmd.
I created a windows service using
httpd.exe -k install
and I could see the service installed as Apache2.4.
When I try to start the server through the windows service it fails with below error, whereas I could able to start the apache server from cmd(run perfectly).
2
Answers
When this problem appears and but running httpd through cmd works fine, Please see in event viewer to see the detailed error
Run -> eventvwr -> windows -> Application ->
If you can run
httpd.exe
via command line, but are unable to start it as a service; the problem might be in folder permissions.(as stated by Pradeep, see:)
Run > eventvwr > windows > Application > ...
If the error is:
Make sure that all paths with
DocumentRoot
, you have added in your apache config, can be accessed by the service.One of the folders in
DocumentRoot
did not have the above users listed, but only my hotmail account, meaning the system was unable to access the specific folder.