Apache Syntax Check

GEEKS !!!

During your learning days in RHCE Training or RHCSS Training you must have find this problem.

Whenever you do some configuration changes in Apache – The webserver and tries to restart or reload the service for making those changes reflect.

Chances are that, that they will. If you have not done any typo error or more stupid errors. But if there are any stupid errors your apache service will fail.

Which you don’t like. Right!!!

So isn’t better to check the syntax of the httpd.conf file after doing editing and before restarting the service.

YO !!!!

GEEKS, you can use a very simple command to check the syntax of httpd.conf file before starting / restarting / reloading the service.

Use –

/usr/sbin/httpd -t

command to check the syntax.

Here is a small illustration from my machine.

PS: You can also check this post and more on Network NUTS Facebook Page.

Apache Syntax Check

Apache Syntax Check

Advertisements