httpd.confの文法チェック


apacheを起動したり再起動させたりする場合、設定ファイルである【httpd.conf】に誤った記述があると起動できず再起動の場合、停止は成功するが起動に失敗してWEBサイトが見れないという最悪の事態になってしまいます。

それを防ぐためのコマンドが用意されていますので、【httpd.conf】の設定を変えたりSSLの設定ファイルである【ssl.conf】などを変更した場合有効です。

文法チェックを行うコマンド

apachectl configtest

記述が正しい場合、【Syntax OK】と表示されます。
誤った記述がある場合は、理由と行数が表示されますので、該当の箇所を修正しましょう。


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>