文書の過去の版を表示しています。
$ sudo yum install epel-release $ sudo yum install -y certbot python-certbot-apache # 何も指定しない場合、ドメインを選択肢から選ぶ $ sudo certbot # 予めドメインを指定して、実行する場合 $ sudo certbot certonly --webroot -w /var/www/example.com -d example.com $ sudo ls -la /etc/httpd/conf.d/ $ sudoedit /etc/httpd/conf.d/vhost-le-ssl.conf $ sudo ls -la /etc/letsencrypt/live/www.example.com/ # CN= の後ろがサーバ名と同じか確認 $ openssl x509 -in /etc/letsencrypt/archive/www.example.com/fullchain1.pem -noout -subject # バーチャルホストの設定を確認 $ sudoedit /etc/httpd/conf.d/vhost.conf # ssl用のバーチャルホストを設定 $ sudoedit /etc/httpd/conf.d/vhost-le-ssl.conf # logファイルに prefix「ssl_」をつける # wwwのあり・なしの統一(なしの場合の例) RewriteEngine on RewriteCond %{SERVER_NAME} =www.example.com RewriteRule ^ https://example.com%{REQUEST_URI} [END,NE,R=permanent] # 再起動 $ sudo apachectl restart
各アドレスにアクセスし、想定通りの動きをするか確認。
コメント