1

I try to setup Apache (part of EnterpriseDB ApachePHP package) for localhost. But Apache won't start since the first restart (after initial configuration). Httpd.exe complains that "DocumentRoot must be a directory" - but it IS a directory, and Apache even recognized it as such before the first restart. This problem persists even when I change the DocumentRoot back to its default directory.

The problematic line looks like this: DocumentRoot "d:\www\" When changing the backslashes to slashes or deleting the trailing backslash httpd.exe works forever and never reaches any result, so I understand that this is the correct format.

There is a good question on this: Apache restart causes DocumentRoot must be a directory, even though it is a directory and there seem to be no privilege issues. Unfortunately, I believe its solution is not applicable to my case: on Windows XP (32 bit) there is no SELinux to disable.

The last action I did before the restart was enabling (uncommenting) php_gd2 library in php.ini. Reverting this didn't make Apache work, so I guess this is not the reason. This (and the root directory in httpd.conf) was the only change I did, otherwise I accepted EDB's defaults.

Any ideas what to do now?

Community
  • 1
  • 1
Pavel V.
  • 2,653
  • 10
  • 43
  • 74
  • 1
    "The problematic line looks like this: DocumentRoot "d:\www\" When changing the backslashes to slashes or deleting the trailing backslash httpd.exe works forever, so I understand that this is the correct format." If it works that way, why not use it? – covener Mar 05 '14 at 11:51
  • @covener: my fault, I editted it now to be more clear: it works, drains CPU, but never reaches any result, like if there were some endless loop. – Pavel V. Mar 06 '14 at 06:47

1 Answers1

3

I have reinstalled EnterpriseDB Apache PHP and now it seems to work fine. The correct format is with no trailing slash - under this configuration server is running now, and when I execute httpd.exe in command line, it shows some log in less than a minute (not "still working after an hour"). I don't know what caused the problem, but it is solved.

Pavel V.
  • 2,653
  • 10
  • 43
  • 74