[Apache] Invalid command ‘SSLCertificateFile’, perhaps misspelled or defined by a module not included in the server configuration

Apache に SSL の設定をして httpd configtest を実行したら、エラーがでました。

エラー内容

Invalid command 'SSLCertificateFile', perhaps misspelled or defined by a module not included in the server configuration

Apache が mod_ssl に対応してなかったので、mod_ssl を追加することでエラーが消えました。

mod_ssl の追加方法は、ソースからコンパイルしてインストールしている場合と、yum などでインストールしている場合とで違ってきます。

ソースからインストールしている場合

・参考:apxsでapacheにモジュールを追加する

yum でインストールしている場合

mod_sslインストール

# yum -y install mod_ssl

opensslインストール

# yum -y install openssl

以上です。


参考情報

apache+mod_sslでSSL — server-memo.net

かぴぶろぐ