Ubuntu20.04+Apacheのインストールエラー対策

HOMEリナックスマスター.JP 公式ブログLinuxエラー対処法 > Ubuntu20.04+Apacheのインストールエラー対策

無料Linux入門マニュアル無料ダウンロード

今だけ2,200円のLinux入門PDFマニュアルが【数量限定】で無料ダウンロードできます。
Linux入門マニュアル無料ダウンロードはこちらをクリック

Ubuntu20.04にApacheをインストールした際、
次のエラーが発生した場合の対処法を紹介します。

・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



無料Linux入門マニュアル無料ダウンロード

今だけ2,200円のLinux入門PDFマニュアルが【数量限定】で無料ダウンロードできます。
Linux入門マニュアル無料ダウンロードはこちらをクリック


<<関連記事>>
・rpmdbが壊れた場合の修復手順
・FortiGuardのスパムメールブロックを解除方法
・LinuxにUSB外付けHDDを接続する(NTFSフォーマットの場合要注意)
・viエディタ(vim)で「readonlyオプションが設定されています」と表示された場合
・yumコマンドがロックファイルエラーになった時の対処

Linux入門マニュアル無料ダウンロード