SSL証明書をテスト環境にコピー

Table of Contents

本番で使用しているSSL証明書をテスト環境にコピー

バックアップ(本番環境)

# cd /etc
# tar zcvf letsencrypt.tar.gz letsencrypt

リストア(テスト環境)

# cd /etc
# tar xvf letsencrypt.tar.gz

設定の変更

・Apacheの設定
# vi /etc/httpd/conf.d/ssl.conf
----------------------------------------------------------------------
SSLCertificateFile /etc/letsencrypt/live/chinaz.org/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/chinaz.org/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/chinaz.org/chain.pem
----------------------------------------------------------------------
・postfixの設定
# vi /etc/postfix/main.cf
----------------------------------------------------------------------
smtpd_tls_cert_file = /etc/letsencrypt/live/chinaz.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/chinaz.org/privkey.pem
----------------------------------------------------------------------
・dovecotの設定
# vi /etc/dovecot/conf.d/10-ssl.conf
----------------------------------------------------------------------
ssl_cert = </etc/letsencrypt/live/chinaz.org/fullchain.pem
ssl_key = </etc/letsencrypt/live/chinaz.org/privkey.pem
----------------------------------------------------------------------

サービスの再起動

systemctl restart httpd
systemctl restart postfix
systemctl restart dovecot

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です