・バーチャルドメインを利用していない場合
特に変更なし
・バーチャルドメインを利用している場合
[root@centos]# vi /etc/httpd/conf/httpd.conf
≪ 途中省略 ≫
#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80
↓※コメント解除して書き換え
ServerName localhost:80
≪ 以下省略 ≫
・ssl.conf の設定
≪ 途中省略 ≫
##
## SSL Virtual Host Context
##
<VirtualHost _default_:443>
# General setup for the virtual host, inherited from global configuration
#DocumentRoot "/var/www/html"
↓※自分の環境に書き換え
DocumentRoot "/home/****/www"
#ServerName www.example.com:443
↓※自分の環境に書き換え
ServerName papa-net.info:443
≪ 途中省略 ≫
# Point SSLCertificateFile at a PEM encoded certificate. If
# the certificate is encrypted, then you will be prompted for a
# pass phrase. Note that restarting httpd will prompt again. Keep
# in mind that if you have both an RSA and a DSA certificate you
# can configure both in parallel (to also allow the use of DSA
# ciphers, etc.)
# Some ECC cipher suites (http://www.ietf.org/rfc/rfc4492.txt)
# require an ECC certificate which can also be configured in
# parallel.
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
↓※cert の場所に書き換え
SSLCertificateFile /etc/letsencrypt/live/www.papa-net.info/cert.pem
# Server Private Key:
# If the key is not combined with the certificate, use this
# directive to point at the key file. Keep in mind that if
# you've both a RSA and a DSA private key you can configure
# both in parallel (to also allow the use of DSA ciphers, etc.)
# ECC keys, when in use, can also be configured in parallel
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
↓※privkey の場所に書き換え
SSLCertificateKeyFile /etc/letsencrypt/live/www.papa-net.info/privkey.pem
# Server Certificate Chain:
# Point SSLCertificateChainFile at a file containing the
# concatenation of PEM encoded CA certificates which form the
# certificate chain for the server certificate. Alternatively
# the referenced file can be the same as SSLCertificateFile
# when the CA certificates are directly appended to the server
# certificate for convenience.
#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt
↓※chain の場所に書き換え
SSLCertificateChainFile /etc/letsencrypt/live/www.papa-net.info/chain.pem
≪ 以下省略 ≫