11

I am trying to setup Apache 2.4 on my windows vista following this guide. But I am getting an eror when I run the comman httpd -k install

// Error (OS 5)Access is denied. : AH00369: Failed to open the WinNT service manager, pe rhaps you forgot to log in as Administrator?

I don't login as administrator set when I swith on my computer. And when I check Control Panel, Administrative Tools, then Services Apache is not on the list.

Can anybody help with this?

Danny Connolly
  • 879
  • 3
  • 10
  • 27

3 Answers3

28

Find cmd.exe and right click to select run as administrator enter image description here

enter image description here

Rakesh Soni
  • 10,135
  • 5
  • 44
  • 51
0

You have to start the command line in Administrator mode.

Opening Command Line window in Administrator mode

Note: Snap is from Windows 8.

Shiv
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Roman Marusyk Nov 25 '16 at 10:29
  • thank you so much but i am still getting some error like below Installing the 'Apache2.4' service The 'Apache2.4' service is successfully installed. Testing httpd.conf.... Errors reported here must be corrected before the service can be started. – BdEngineer Feb 26 '18 at 04:01
0

On Windows server 2008, for some reason the command httpd -k install did not work (AH00369) even though I was in an Administrator command prompt.

However I was able to install the service using the sc command (references https://support.microsoft.com/en-us/help/251192/how-to-create-a-windows-service-by-using-sc-exe and When creating a service with sc.exe how to pass in context parameters?)

sc.exe create apache2.4 start= auto obj= "<username>" password= "<password>" DisplayName= "Apache 2.4" depend= "Tcpip/Afd" binpath= "\"c:\wamp\bin\apache\apache2.4.33\bin\httpd.exe\" -k runservice"

username and password are necessary if you access network drives or UNC pathnames from apache

jluu
  • 347
  • 3
  • 7