
これまでhttpsで表示されていたページが表示されなくなり、再設定を試みています。
yum -y install epel-release
yum -y install certbot python-certbot-apachecertbot実行時に、httpdのrestartが実行されるようにします。
curl https://dl.eff.org/certbot-auto -o /usr/bin/certbot-auto
chmod 700 /usr/bin/certbot-autoドメイン名を変更して
certbot-auto certonly --webroot -w /var/www/html -d domain.jp --email info@domain.jp#ドメインでの設定
確認をする
ls -l /etc/letsencrypt/live/domain.jp/[/etc/httpd/conf.d/ssl.conf]
vi /etc/httpd/conf.d/ssl.conf
SSLCertificateFile /etc/letsencrypt/live/[サーバーのドメイン]/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/[サーバーのドメイン]/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/[サーバーのドメイン]/chain.pem再起動する
systemctl stop httpd
systemctl start httpdsystemctl stop httpd
firewall-cmd --add-service=https --zone=public --permanent
firewall-cmd --reloadhttpd.conf を編集
vi /etc/httpd/conf/httpd.conf
<ifModule mod_rewrite.c>
RewriteEngine On
LogLevel alert rewrite:trace3
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
</ifModule>crontab -u root -e
00 23 * * 0 certbot renew && systemctl restart httpd
00 23 * * 0 /usr/bin/certbot-auto renew --webroot-path /var/www/html --post-hook "/bin/systemctl reload httpd"
といつもやっているようにやっているのですが、
うまくいきません。
firewall-cmd --add-service=https --zone=public --permanent
firewall-cmd --reload
この部分で躓いているような気がします。
FirewallD is not running
と表示されています。
解決方法を探っているのですが、なかなか前に進みません。
よろしくお願いいたします。
(追記)
コマンドの実行結果 (systemctl status httpd)
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2019-08-19 23:37:39 JST; 32min ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 28928 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=0/SUCCESS)
Process: 28909 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=0/SUCCESS)
Main PID: 29043 (httpd)
Status: "Total requests: 111; Current requests/sec: 0; Current traffic: 0 B/sec"
CGroup: /system.slice/httpd.service
tq29043 /usr/sbin/httpd -DFOREGROUND
tq29046 /usr/sbin/httpd -DFOREGROUND
tq29047 /usr/sbin/httpd -DFOREGROUND
tq29060 /usr/sbin/httpd -DFOREGROUND
tq29061 /usr/sbin/httpd -DFOREGROUND
tq29062 /usr/sbin/httpd -DFOREGROUND
tq29080 /usr/sbin/httpd -DFOREGROUND
tq29085 /usr/sbin/httpd -DFOREGROUND
tq29089 /usr/sbin/httpd -DFOREGROUND
tq29090 /usr/sbin/httpd -DFOREGROUND
mq29168 /usr/sbin/httpd -DFOREGROUND
Aug 19 23:37:39 150-95-140-210 systemd[1]: Starting The Apache HTTP Server...
Aug 19 23:37:39 150-95-140-210 systemd[1]: Started The Apache HTTP Server.
(追記)
コマンドの実行結果 (httpd -t -D DUMP_VHOSTS)
VirtualHost configuration:
*:443 www.example.com (/etc/httpd/conf.d/ssl.conf:56)
(追記)
コマンドの実行結果 (httpd -t )
Syntax OK
(エラーメッセージ)
Attempting to renew cert (www.efficient-system.jp) from /etc/letsencrypt/renewal/www.efficient-system.jp.conf produced an unexpected error: Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.. Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/www.efficient-system.jp/fullchain.pem (failure)





















回答1件
あなたの回答
tips
プレビュー