0
votes

i have formatted my PC (with windows 10 pro 64 bit) and reinstalled apache 2.4.17 and PHP 5.6.15. But from the line command when i give a "httpd -k install" i receive the error "httpd: Syntax error on line 37 of C:/Server/Apache/conf/httpd.conf: ServerRoot must be a valid directory" in the line 37 of httpd.conf i put

ServerRoot "C:/Server/Apache"

so why httpd.conf don't find this directory????

2

2 Answers

0
votes

There could be different reasons why this message is displayed. Verify all:

  • are you running this as an Admin.
  • try to provide this directory with -d option
0
votes

To fix this error, open and edit the following line in C:\local\apache\conf\httpd.conf:

#ServerRoot "c:/Apache24" # original setting
ServerRoot "c:/local/apache" #according to your apache destination