重要なお知らせ

「教えて! goo」は2025年9月17日(水)をもちまして、サービスを終了いたします。詳細はこちら>

電子書籍の厳選無料作品が豊富!

これまで、apache の設定を変更する度、リスタート前に、
apachectl -t を打ち込んでから、 apachectl restart と打ち込んでいました。
apachectl -t を打つと色々出力される時もありますが、
構文チェックの為のコマンドでしょうか ?

詳しい方おりましたら、ご教授をお願い致します。

宜しくお願い致します。

macOS Mojave 10.14.5

A 回答 (2件)

EN2JA:~ oa$ apachectl -?


Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
[-C "directive"] [-c "directive"]
[-k start|restart|graceful|graceful-stop|stop]
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
-D name : define a name for use in <IfDefine name> directives
(中略)
-t -D DUMP_VHOSTS : show parsed vhost settings
-t -D DUMP_RUN_CFG : show parsed run settings
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
-t -D DUMP_MODULES : show all loaded modules
-M : a synonym for -t -D DUMP_MODULES
-t -D DUMP_INCLUDES: show all included configuration files
-t : run syntax check for config files
-T : start without DocumentRoot(s) check
-X : debug mode (only one worker, do not detach)


UNIX コマンド体系は、-? でヘルプが出てきますので、まずそれを確認する。
    • good
    • 0
この回答へのお礼

勉強になりました。
ご回答ありがとうございました。

お礼日時:2019/05/30 14:29

https://httpd.apache.org/docs/2.4/programs/apach …

configtest
Run a configuration file syntax test.
It parses the configuration files and either reports Syntax Ok or detailed information about the particular syntax error.
This is equivalent to apachectl -t.
    • good
    • 0
この回答へのお礼

ご回答ありがとうございました。

お礼日時:2019/05/30 14:30

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!