Test the Apache Configuration File httpd.conf
After making changes to the Apache configuration file or any virtual host it’s good practice to test the config for errors before reloading the config.
To test the Apache configuration file for errors, use the following command:
If the configuration file is fine, this command will return Syntax Ok. Otherwise, it will return detailed information about the error discovered.
If apachectl is not in your PATH and you do not know where it is, refer to the tech recipe Find a file by name to find the location of apachectl, then run it with the fully qualified path. Note the following example: