Syntax error on line 39 of c:……. .conf/httpd.conf: ServerRoot must be a valid directory.
What I am trying to do
I am trying to run a new install of Apache under Windows 10.
Edit the \Apache24\conf\httpd.conf file.
At line 39 and ensure that the path to the folder where your installation is. (i.e. where you unzipped the downloaded file).
In my case, I extracted the downloaded file to the c:\dev directory so the change needed is highlighted below.
How to test
Now try to run Apache again – by running the httpd.exe command from the command prompt. If you get a cursor sitting on the next line with no error, then you are okay, and can test it by opening a browser and going to: http://localhost
- The default installation of Apache (2.4 in my example) expects that it is installed in the c:\Apache24 directory.
- If you download the file and don’t extract it from the root of the c:\ drive then you will see this error.
- The SRVROOT shows “/Apache24” as the folder – whereas on Windows you would normally expect to see “c:\Apache24” for a folder.
Request to visitors
Click “Like” if this helped and I’ll post more like this that may help you, or others in the future.
Feedback welcomed on style/format etc.