以下內容是 2020年 September 的归档:

让插件baidu-sitemap-generator支持WordPress自定义文章类型

这里以自定义文章类型“shuoshuo”为例,涉及插件/baidu-sitemap-generator/baidu_sitemap.php的两处修改,174行和314行,废话不多说,直接贴代码。(举例为”baidu-sitemap-generator v1.6.5) 找到插件的baidu_sitemap.php文件,打开。 找到174行代码 1AND (post_type='post' or post_type='page') 改为: 1AND (post_type='post' or post_type='page' or post_type='shuoshuo') 找到314行代码 1AND post_type='post' 改为: 1AND (post_type='post' or post_type='shuoshuo') 来源:https://www.mrwu.red/biji/801.html (more...)

Validation disabled for letsencrypt V1 API LNMP添加SSL出错

Let’s encrypt报错: new-authz error: {“type”:”urn:acme:error:unauthorized”,”detail”:”Error creating new authz :: Validations for new domains are disabled in the V1 API (https://community.letsencrypt.org/t/end-of-life-plan-for-acmev1/88430)”,”status”: 403} 解决方式:更新你的acme(/root/.acme.sh/acme.sh –upgrade) 思路:认真看这个报错,其实报错信息是比较明显的。网上大多数都是抄的(网站被举报了,去谷歌申诉)。报错信息说得是disabled,而不是unsafe 参考:https://blog.csdn.net/qq_36798131/article/details/107554435 补充acme github地址:https://github.com/acmesh-official/acme.sh 因为可能国内无法直接更新,所以补充上面的链接地址,可以下载后上传到/usr/local/acme.sh/ 然后重启下lnmp,然后重新为域名添加ssl即可。 强制更新Let’s Encrypt证书命令: 1"/usr/local/acme.sh"/acme.sh --force --cron --home "/usr/local/acme.sh" > /dev/null 出现 Congratulations, all renewals succeeded. 字样时,表示证书更新完成。(参考:https://www.seoimo.com/lamp-ssl/#ssl-renew-crontab) (more...)