この記事の監修:宮崎智広(Linux実務・教育歴20年以上・受講者3,100名超)
次のエラーが発生した場合の対処法を紹介します。
・Invalid command 'RewriteEngine'
・Invalid command 'SSLEngine'
・Invalid command 'Header'
Invalid command 'RewriteEngine'
エラー内容
Jan 19 03:14:28 linuxmaster-01 apachectl[2433]: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
対応手順
$ sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
systemctl restart apache2
でも安心してください。プロのエンジニアはコマンドを暗記していません。
「現場で使える型」を効率よく使いこなしているだけです。
Invalid command 'SSLEngine'
エラー内容
Jan 19 03:15:25 linuxmaster-01 apachectl[2485]: Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration
対応手順
$ sudo a2enmod ssl
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Enabling module socache_shmcb.
Enabling module ssl.
See /usr/share/doc/apache2/README.Debian.gz on how to configure SSL and create
self-signed certificates.
To activate the new configuration, you need to run:
systemctl restart apache2
Invalid command 'Header'
エラー内容
Jan 19 03:18:15 linuxmaster-01 apachectl[2599]: Invalid command 'Header', perhaps misspelled or defined by a module not included in the server configuration
対応手順
$ sudo a2enmod headers
Enabling module headers.
To activate the new configuration, you need to run:
systemctl restart apache2
3,100名以上が実践した「型」を無料で公開中
プロのエンジニアはコマンドを暗記していません。
「現場で使える型」を効率よく使いこなしているだけです。
その「型」を図解60Pにまとめた入門マニュアルを、完全無料でプレゼントしています。
登録10秒/合わなければ解除3秒 / 詳細はこちら
- 次のページへ:Ubuntu20.04でFailed to fetch 404 Not Foundエラーが発生した場合の対処法
- 前のページへ:rpmdbが壊れた場合の修復手順
- この記事の属するカテゴリ:Linuxエラー対処法へ戻る

無料メルマガで学習を続ける
Linuxの実践スキルをメールで毎週お届け。
登録は1分、解除もいつでも可。
登録無料・いつでも解除できます