- 积分
- 2
- 威望
-
- 金钱
-
- 注册时间
- 2018-3-4
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
楼主 |
发表于 2018-3-5 18:49:53
|
显示全部楼层
回复 8# 的帖子
root@VM-0-11-debian:~# wget -O - http://soft.vpser.net/lnmp/ext/fix_renewssl.sh|bash
--2018-03-05 18:22:47-- http://soft.vpser.net/lnmp/ext/fix_renewssl.sh
Resolving soft.vpser.net (soft.vpser.net)... 112.85.42.39
Connecting to soft.vpser.net (soft.vpser.net)|112.85.42.39|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://202.115.33.13/soft/lnmp/ext/fix_renewssl.sh [following]
--2018-03-05 18:22:47-- http://202.115.33.13/soft/lnmp/ext/fix_renewssl.sh
Connecting to 202.115.33.13:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1410 (1.4K) [application/octet-stream]
Saving to: ‘STDOUT’
- 100%[=========================>] 1.38K --.-KB/s in 0s
2018-03-05 18:22:47 (231 MB/s) - written to stdout [1410/1410]
Remove Let's encrypt crontab renew rule...
Update Let's encrypt crontab renew rule...
OK.
Try to run certbot renew script...
Saving debug log to /var/log/letsencrypt/letsencrypt.log
-------------------------------------------------------------------------------
Processing /etc/letsencrypt/renewal/ssssss.org.conf
-------------------------------------------------------------------------------
Cert not yet due for renewal
-------------------------------------------------------------------------------
The following certs are not due for renewal yet:
/etc/letsencrypt/live/ssssss.org/fullchain.pem (skipped)
No renewals were attempted.
No hooks were run.
-------------------------------------------------------------------------------
root@VM-0-11-debian:~# cat /var/log/letsencrypt/letsencrypt.log
2018-03-05 10:22:53,761:DEBUG:certbot.main:certbot version: 0.21.1
2018-03-05 10:22:53,761:DEBUG:certbot.main:Arguments: ['--disable-hook-validation', '--renew-hook', '/etc/init.d/nginx reload']
2018-03-05 10:22:53,761:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#apache,PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2018-03-05 10:22:53,774:DEBUG:certbot.log:Root logging level set at 20
2018-03-05 10:22:53,775:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2018-03-05 10:22:53,813:DEBUG:certbot.plugins.selection:Requested authenticator <certbot.cli._Default object at 0x7f96c9804dd0> and installer <certbot.cli._Default object at 0x7f96c9804dd0>
2018-03-05 10:22:53,813:DEBUG:certbot.cli:Default Detector is Namespace(account=<certbot.cli._Default object at 0x7f96c97da290>, agree_dev_preview=None, allow_subset_of_names=<certbot.cli._Default object at 0x7f96c9844d10>, apache=<certbot.cli._Default object at 0x7f96c98047d0>, apache_challenge_location=<certbot.cli._Default object at 0x7f96c978e3d0>, apache_ctl=<certbot.cli._Default object at 0x7f96c978e7d0>, apache_dismod=<certbot.cli._Default object at 0x7f96c984bd50>, apache_enmod=<certbot.cli._Default object at 0x7f96c9832850>, apache_handle_modules=<certbot.cli._Default object at 0x7f96c978e550>, apache_handle_sites=<certbot.cli._Default object at 0x7f96c978e6d0>, apache_init_script=<certbot.cli._Default object at 0x7f96c978e910>, apache_le_vhost_ext=<certbot.cli._Default object at 0x7f96c984b650>, apache_logs_root=<certbot.cli._Default object at 0x7f96c978e210>, apache_server_root=<certbot.cli._Default object at 0x7f96c984b210>, apache_vhost_root=<certbot.cli._Default object at 0x7f96c984bfd0>, authenticator=<certbot.cli._Default object at 0x7f96c9804dd0>, break_my_certs=<certbot.cli._Default object at 0x7f96c9804350>, cert_path=<certbot.cli._Default object at 0x7f96c9808d90>, certname=<certbot.cli._Default object at 0x7f96c984bc90>, chain_path=<certbot.cli._Default object at 0x7f96c9808790>, checkpoints=<certbot.cli._Default object at 0x7f96c9808f10>, config_dir=<certbot.cli._Default object at 0x7f96c9808610>, config_file=None, configurator=<certbot.cli._Default object at 0x7f96c9804dd0>, csr=<certbot.cli._Default object at 0x7f96c9808b10>, debug=<certbot.cli._Default object at 0x7f96c97dac10>, debug_challenges=<certbot.cli._Default object at 0x7f96c97dad10>, delete_after_revoke=<certbot.cli._Default object at 0x7f96c9808d10>, deploy_hook=<certbot.cli._Default object at 0x7f96c9808390>, dialog=None, directory_hooks=<certbot.cli._Default object at 0x7f96c9808590>, dns_cloudflare=<certbot.cli._Default object at 0x7f96c97dad90>, dns_cloudxns=<certbot.cli._Default object at 0x7f96c97dab90>, dns_digitalocean=<certbot.cli._Default object at 0x7f96c97da990>, dns_dnsimple=<certbot.cli._Default object at 0x7f96c97da7d0>, dns_dnsmadeeasy=<certbot.cli._Default object at 0x7f96c97da1d0>, dns_google=<certbot.cli._Default object at 0x7f96c97da6d0>, dns_luadns=<certbot.cli._Default object at 0x7f96c9844a50>, dns_nsone=<certbot.cli._Default object at 0x7f96c9844750>, dns_rfc2136=<certbot.cli._Default object at 0x7f96c9844290>, dns_route53=<certbot.cli._Default object at 0x7f96c9832dd0>, domains=<certbot.cli._Default object at 0x7f96c984ba50>, dry_run=<certbot.cli._Default object at 0x7f96c9832510>, duplicate=<certbot.cli._Default object at 0x7f96c97da110>, eff_email=<certbot.cli._Default object at 0x7f96c9832e50>, email=<certbot.cli._Default object at 0x7f96c9832c10>, expand=<certbot.cli._Default object at 0x7f96c9844590>, force_interactive=<certbot.cli._Default object at 0x7f96c984b810>, fullchain_path=<certbot.cli._Default object at 0x7f96c9808990>, func=<function renew at 0x7f96c9a77668>, hsts=<certbot.cli._Default object at 0x7f96c9804850>, http01_address=<certbot.cli._Default object at 0x7f96c9804250>, http01_port=<certbot.cli._Default object at 0x7f96c9804150>, ifaces=<certbot.cli._Default object at 0x7f96c978e250>, init=<certbot.cli._Default object at 0x7f96c978e050>, installer=<certbot.cli._Default object at 0x7f96c9804dd0>, key_path=<certbot.cli._Default object at 0x7f96c9808b90>, logs_dir=<certbot.cli._Default object at 0x7f96c9808210>, manual=<certbot.cli._Default object at 0x7f96c98041d0>, manual_auth_hook=<certbot.cli._Default object at 0x7f96c9832950>, manual_cleanup_hook=<certbot.cli._Default object at 0x7f96c978eb50>, manual_public_ip_logging_ok=<certbot.cli._Default object at 0x7f96c978ec50>, max_log_backups=<certbot.cli._Default object at 0x7f96c984b390>, must_staple=<certbot.cli._Default object at 0x7f96c9804550>, nginx=<certbot.cli._Default object at 0x7f96c98045d0>, nginx_ctl=<certbot.cli._Default object at 0x7f96c978ee90>, nginx_server_root=<certbot.cli._Default object at 0x7f96c978ea10>, no_bootstrap=<certbot.cli._Default object at 0x7f96c97da910>, no_self_upgrade=<certbot.cli._Default object at 0x7f96c97da750>, no_verify_ssl=<certbot.cli._Default object at 0x7f96c97dae10>, noninteractive_mode=<certbot.cli._Default object at 0x7f96c984b5d0>, num=<certbot.cli._Default object at 0x7f96c9808810>, os_packages_only=<certbot.cli._Default object at 0x7f96c97da790>, post_hook=<certbot.cli._Default object at 0x7f96c9808190>, pre_hook=<certbot.cli._Default object at 0x7f96c9808090>, pref_challs=<certbot.cli._Default object at 0x7f96c9804f50>, prepare=<certbot.cli._Default object at 0x7f96c978e150>, quiet=<certbot.cli._Default object at 0x7f96c97daa10>, reason=<certbot.cli._Default object at 0x7f96c9808c10>, redirect=<certbot.cli._Default object at 0x7f96c9804650>, register_unsafely_without_email=<certbot.cli._Default object at 0x7f96c9832790>, reinstall=<certbot.cli._Default object at 0x7f96c9844310>, renew_by_default=<certbot.cli._Default object at 0x7f96c9844890>, renew_hook='/etc/init.d/nginx reload', renew_with_new_domains=<certbot.cli._Default object at 0x7f96c9844ad0>, rsa_key_size=<certbot.cli._Default object at 0x7f96c9804450>, server=<certbot.cli._Default object at 0x7f96c9808050>, staging=<certbot.cli._Default object at 0x7f96c97dab10>, standalone=<certbot.cli._Default object at 0x7f96c98043d0>, standalone_supported_challenges=<certbot.cli._Default object at 0x7f96c978ef90>, staple=<certbot.cli._Default object at 0x7f96c9804c50>, strict_permissions=<certbot.cli._Default object at 0x7f96c9804e50>, text_mode=<certbot.cli._Default object at 0x7f96c984b150>, tls_sni_01_address=<certbot.cli._Default object at 0x7f96c9804050>, tls_sni_01_port=<certbot.cli._Default object at 0x7f96c97daf10>, tos=<certbot.cli._Default object at 0x7f96c97da3d0>, uir=<certbot.cli._Default object at 0x7f96c9804a50>, update_registration=<certbot.cli._Default object at 0x7f96c98329d0>, user_agent=<certbot.cli._Default object at 0x7f96c9808910>, user_agent_comment=<certbot.cli._Default object at 0x7f96c9808a10>, validate_hooks=True, verb='renew', verbose_count=<certbot.cli._Default object at 0x7f96c984bed0>, webroot=<certbot.cli._Default object at 0x7f96c97daf90>, webroot_map=<certbot.cli._Default object at 0x7f96c97901d0>, webroot_path=<certbot.cli._Default object at 0x7f96c978ed90>, work_dir=<certbot.cli._Default object at 0x7f96c9808410>)
2018-03-05 10:22:53,830:INFO:certbot.renewal:Cert not yet due for renewal
2018-03-05 10:22:53,831:DEBUG:certbot.renewal:no renewal failures
root@VM-0-11-debian:~# crontab -l
*/1 * * * * /usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &
*/20 * * * * /usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null &
39 1,13 * * * root /home/ec2-user/certbot-auto renew –no-self-upgrade –debuge
0 3 */7 * * /bin/certbot renew --disable-hook-validation --renew-hook "/etc/init.d/nginx reload"
军哥现在这样有问题么?
crontab规则中倒数第二条有没有必要删掉?现在我看浏览器中该证书有效期还是没有发生变化。
nginx.conf中加入
location / {
rewrite ^(.) https://$host$1 permanent;
}
与SSSSSS.org.conf中加入
if ($scheme = http) {
#return 301 https://$host$request_uri;
}有什么区别么?
军哥辛苦了 |
|