Let’s Encryptを使ってEC2にSSL証明書の発行をする マルチドメインの場合、ssl.confではなくhttpd.confにSSL証明書を発行する
httpd.confの設定
場所/etc/httpd/conf/httpd.conf
NameVirtualHost *:443 <VirtualHost *:443> ServerName ****1.com DocumentRoot /var/www/html SSLEngine on SSLCertificateFile /etc/letsencrypt/live/****1.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/****1.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/****1.com/chain.pem </VirtualHost> <VirtualHost *:443> ServerName ****2.com DocumentRoot /var/www/new-html SSLEngine on SSLCertificateFile /etc/letsencrypt/live/****2.com/cert.pem SSLCertificateKeyFile /etc/letsencrypt/live/****2.com/privkey.pem SSLCertificateChainFile /etc/letsencrypt/live/****2.com/chain.pem </VirtualHost>
ssl.confの設定
場所/etc/httpd/conf.d/ssl.conf