Check httpd.conf for syntax errors

So you are finished editing your httpd.conf file. Before restarting or reloading your httpd service you might want to check the syntax of the httpd.conf for any errors. 

Like we have “named-checkconf” in bind / dns.

For apache you can use – 

httpd -t -f /etc/httpd/conf/httpd.conf

If there is some error in your httpd.conf it will be shouted loud else you will get a OK message.

Play Safe, Use it.

Here is the screenshot from my machine. I had first intentionally made some typo errors, then run the command, it shows me the error. Then I rectified it and the command has no problem in saying OK to me.

networknuts-httpd-check

Advertisements