How to check for Apache configuration errors before restarting?

2

Several times I needed to restart Apache after making some settings, I was displeased to receive a failure message because of a configuration error.

A colleague here on the site once informed me that there was a command in Apache that it was possible to check the configuration. So, before restarting the server, I might know if I made a syntax error - but for a change, I forgot the command.

What is the command used to do this?

    
asked by anonymous 21.06.2017 / 16:05

1 answer

5
apachectl configtest

or

httpd -t
    
21.06.2017 / 16:08