letsencryptを使ってSSL証明書を設置する手順
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
[[letsencrypt]]
* 概要 [#e161ad90]
letsencryptを使ってSSL証明書を設置する手順です。
* 手順 [#fcc2200b]
# cd /usr/local/
# git clone https://github.com/certbot/certbot
# cd certbot/
# ./certbot-auto -n
# ./certbot-auto certonly --webroot \
-w /var/www/example -d example.com \
-m sample@example.com \
--agree-tos -n
*webサーバーの設定 [#td0b0a42]
*** apacheの場合(CentOS6(sysvinit),apache2.2の場合) [#n6a...
下記設定で80番にきた受付をすべてhttpsへリダイレクトさせる。
# vim httpd.conf <-- 80番の設定
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule /.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=3...
# vim ssl.conf
DocumentRoot <-- 80番の設定と同じ
ServerName <-- 80番の設定と同じ
下記へ変更する
SSLCertificateFile /etc/letsencrypt/live/example.com/cer...
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/...
SSLCACertificateFile /etc/letsencrypt/live/example.com/c...
# serivce httpd configtest
# service httpd graceful
*自動更新設定 [#tf41cd71]
# crontab -e
00 05 01 * * /usr/local/certbot/certbot-auto renew --for...
終了行:
[[letsencrypt]]
* 概要 [#e161ad90]
letsencryptを使ってSSL証明書を設置する手順です。
* 手順 [#fcc2200b]
# cd /usr/local/
# git clone https://github.com/certbot/certbot
# cd certbot/
# ./certbot-auto -n
# ./certbot-auto certonly --webroot \
-w /var/www/example -d example.com \
-m sample@example.com \
--agree-tos -n
*webサーバーの設定 [#td0b0a42]
*** apacheの場合(CentOS6(sysvinit),apache2.2の場合) [#n6a...
下記設定で80番にきた受付をすべてhttpsへリダイレクトさせる。
# vim httpd.conf <-- 80番の設定
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule /.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=3...
# vim ssl.conf
DocumentRoot <-- 80番の設定と同じ
ServerName <-- 80番の設定と同じ
下記へ変更する
SSLCertificateFile /etc/letsencrypt/live/example.com/cer...
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/...
SSLCACertificateFile /etc/letsencrypt/live/example.com/c...
# serivce httpd configtest
# service httpd graceful
*自動更新設定 [#tf41cd71]
# crontab -e
00 05 01 * * /usr/local/certbot/certbot-auto renew --for...
ページ名: