the command is:

sudo apache2ctl configtest

It tells you if there are any syntax errors, if a location points to nothing, or if a file it points to has an incorrect format.

The output will tell you Ok or Error and will detail it.