skip to Main Content

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).

Error output here

2

Answers


  1. Chosen as BEST ANSWER

    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 ->


  2. 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:

    DocumentRoot must be a directory .

    Make sure that all paths with DocumentRoot, you have added in your apache config, can be accessed by the service.

    • Right click the folder
    • Select Properties
    • Go to the “Security” tab
    • Default values (in my case, windows 10 pro) are:
      • Authenticated Users
      • SYSTEM
      • Administrators (PC-NameAdministrators)
      • Users (PC-NameUsers

    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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search