用宝塔的同学大部分是自建博客啥的吧,这两天SSL证书过期了,需要续一下,但是遇到了两个问题。如下
申请证书报一小时申请次数过多
这个在网上找了个帖子,看了一些老哥的评论。总结下来,宝塔客服没总结到这个问题。下面评论的老哥说不是申请次数多的问题,是因为不能一次性申请多个域名。原贴:【已解答】该帐户1小时内失败的订单次数超过5次 - Linux面板 - 宝塔面板论坛 (bt.cn)
我这个很奇怪,几个月前跟着网上教程做的,也可能是新手允许申请多个域名,然后再续就不行了,也可能是宝塔改了。解决方案:申请一个即可成功,点击这个申请证书,填写信息表单即可
ps:宝塔对异常捕获的还是不完整啊,乱抛
解决多个域名开启https
上面那个问题解决了,但是出现一个新的问题是你只能为一个域名启用一个证书了(可能还有其他的nginx和服务器配置,我这个没去研究,但是宝塔是只能设置一个)。就比如说我想访问www.bugdesigner.cn
和blog.bugdesigner.cn
都要访问到我的博客网站。
解决方法是新建一个站点,让这个站点也指向你的wp目录,这样你可以部署一个证书,两个子站点都开启了https。下面是手把手教程
可能会有的问题
我配置的时候宝塔抽风了,那个新网站默认的重写配置没给我设置,导致我访问新域名(blog.bugdesigner.cn)一直404
解决方案:用宝塔或者finalshell这种能够访问服务器文件的工具,把下面这个配置粘进去
location /
{
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
番外篇:让宝塔面板通过https支持的域名访问
安装完成以后,宝塔会给你一个默认的外网访问地址,这个是根据ip访问,后面还有一个8位的哈希值(应该叫哈希值吧),并且还老显示不安全。接下来介绍怎么解决这个问题
点击面板设置,直接输入这个绑定域名就可以了,下面的安全入口可以关了,但是我设置的是直接转发
接下来能访问还是不安全,要做的是再新建一个站点,具体不再赘述,域名跟上一步绑定域名一样,指向目录指向一个新目录即可
还是申请ssl秘钥,接下来要做的是把大机构发的秘钥和证书覆盖宝塔自签的半吊子证书。
点击文件,把key和证书替换默认的文件即可(直接点击可以进入宝塔的文件管理界面)
可能有些同学觉得还需要https://{域名}:40524/{哈希值}
太多了记不住
-
上面那个配置可以吧哈希值去了(但我没设置)
-
配置新网站转发规则
还记得吗,之前创建了一个新网站,这个时候去nginx.conf里面配置一下告诉nginx我们访问这个网站的时候自动重定向到宝塔面板这个网站,配置如下
location / { return 301 https://pannel.bugdesigner.cn:40524/2784c86e; # 301重定向,注意修改成你想让他重定向的网站 }
文章评论
Hello there! Do you know if they make any plugins to assist with Search Engine Optimization? I'm trying to
get my site to rank for some targeted keywords but I'm not seeing very good results.
If you know of any please share. Thank you!
I saw similar text here: <a href="https://www.ecobij.nl/shop/">Warm blankets</a>
Maybe this simplest factor anyone can do to eat much less and really feel fuller is to easily slow down.
<a href="https://junaidqcur223627.angelinsblog.com/28627863/unveiling-the-truth-behind-defender-of-sugar-the-sweetness-may-be-fading">sugar defender official website</a> Adding Sugar Protector to my everyday routine was just one of the best choices I have actually created my wellness.
I beware regarding what I eat, yet this supplement includes an added
layer of assistance. I feel much more stable throughout the day,
and my yearnings have actually lowered dramatically. It behaves to have something so straightforward that makes such a large difference!
<a href="https://sugardefender-en-us.com">sugar defender ingredients</a> For
many years, I've battled uncertain blood sugar swings that left me feeling drained and sluggish.
But since incorporating Sugar my energy levels are currently steady and constant, and
I no longer hit a wall in the afternoons. I value that it's a gentle, all-natural technique that does not included any kind of
undesirable adverse effects. It's really transformed my
day-to-day live.
Everything is very open with a clear description of the challenges. It was really informative. Your site is very useful. Thanks for sharing!
I blog quite often and I really appreciate your information. This article has truly peaked my interest. I will bookmark your site and keep checking for new information about once a week. I subscribed to your RSS feed as well.