当前位置: 首页 > news >正文

懒人手机网站成都专业seo公司

懒人手机网站,成都专业seo公司,网站在广告法之前做的,影视网站建设要多少钱使用 acme.sh 申请并安装 SSL 证书 本文将辅助您通过 acme.sh 工具申请并安装 Let’s Encrypt 的免费 SSL 证书。 环境准备 可访问公网的服务器。已安装 Nginx (本文以此,其它类似),并确保 80 端口可正常访问。拥有域名解析权&a…

使用 acme.sh 申请并安装 SSL 证书

本文将辅助您通过 acme.sh 工具申请并安装 Let’s Encrypt 的免费 SSL 证书。


环境准备

  • 可访问公网的服务器。
  • 已安装 Nginx (本文以此,其它类似),并确保 80 端口可正常访问。
  • 拥有域名解析权,确保域名指向服务器 IP。
  • 愿意在你的服务器上面执行五条命令

SSL 检测工具–效果图
在这里插入图片描述

步骤 1:安装 acme.sh

执行以下命令安装 acme.sh

curl https://get.acme.sh | sh

效果展示:

[root@instance-sp608fvo tmp]# curl https://get.acme.sh | sh% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed
100  1032    0  1032    0     0    399      0 --:--:--  0:00:02 --:--:--   399% Total    % Received % Xferd  Average Speed   Time    Time     Time  CurrentDload  Upload   Total   Spent    Left  Speed
100  221k  100  221k    0     0  13834      0  0:00:16  0:00:16 --:--:-- 11956
[Thu Jun 12 12:33:51 CST 2025] Installing from online archive.
[Thu Jun 12 12:33:51 CST 2025] Downloading https://github.com/acmesh-official/acme.sh/archive/master.tar.gz
[Thu Jun 12 12:33:59 CST 2025] Extracting master.tar.gz
[Thu Jun 12 12:33:59 CST 2025] It is recommended to install socat first.
[Thu Jun 12 12:33:59 CST 2025] We use socat for the standalone server, which is used for standalone mode.
[Thu Jun 12 12:33:59 CST 2025] If you don't want to use standalone mode, you may ignore this warning.
[Thu Jun 12 12:33:59 CST 2025] Installing to /root/.acme.sh
[Thu Jun 12 12:33:59 CST 2025] Installed to /root/.acme.sh/acme.sh
[Thu Jun 12 12:33:59 CST 2025] Installing alias to '/root/.bashrc'
[Thu Jun 12 12:33:59 CST 2025] Close and reopen your terminal to start using acme.sh
[Thu Jun 12 12:33:59 CST 2025] Installing alias to '/root/.cshrc'
[Thu Jun 12 12:33:59 CST 2025] Installing alias to '/root/.tcshrc'
[Thu Jun 12 12:33:59 CST 2025] Installing cron job
[Thu Jun 12 12:33:59 CST 2025] bash has been found. Changing the shebang to use bash as preferred.
[Thu Jun 12 12:34:01 CST 2025] OK
[Thu Jun 12 12:34:01 CST 2025] Install success!

步骤 2:设置默认 CA

指定使用 Let’s Encrypt 作为默认证书颁发机构:

source ~/.bashrc
acme.sh --set-default-ca --server letsencrypt

效果展示:

[root@instance-sp608fvo ~]# source ~/.bashrc
[root@instance-sp608fvo ~]# acme.sh --set-default-ca --server letsencrypt
[Thu Jun 12 12:40:46 CST 2025] Changed default CA to: https://acme-v02.api.letsencrypt.org/directory

步骤 3:申请证书

使用 --webroot 模式申请证书。确保域名已正确解析到服务器,并且 /usr/share/nginx/html 是 Nginx 的默认根目录。

acme.sh --issue  -d 域名比如baidu.com --webroot 80端口可访问地址比如/usr/share/nginx/html

示例:

acme.sh --issue -d     test.example.com --webroot /usr/share/nginx/html

效果展示:

[root@instance-sp608fvo nginx]# acme.sh --issue  -d     test.example.com --webroot /usr/share/nginx/html
[Thu Jun 12 12:49:54 CST 2025] Using CA: https://acme-v02.api.letsencrypt.org/directory
[Thu Jun 12 12:49:54 CST 2025] Creating domain key
[Thu Jun 12 12:49:54 CST 2025] The domain key is here: /root/.acme.sh/    test.example.com_ecc/    test.example.com.key
[Thu Jun 12 12:49:54 CST 2025] Single domain='test.example.com'
[Thu Jun 12 12:50:01 CST 2025] Getting webroot for domain='test.example.com'
[Thu Jun 12 12:50:01 CST 2025] Verifying: test.example.com
[Thu Jun 12 12:50:03 CST 2025] Pending. The CA is processing your order, please wait. (1/30)
[Thu Jun 12 12:50:08 CST 2025] Success
[Thu Jun 12 12:50:08 CST 2025] Verification finished, beginning signing.
[Thu Jun 12 12:50:08 CST 2025] Let's finalize the order.
[Thu Jun 12 12:50:08 CST 2025] Le_OrderFinalize='https://acme-v02.api.letsencrypt.org/acme/finalize/2459862082/393925191632'
[Thu Jun 12 12:50:12 CST 2025] Downloading cert.
[Thu Jun 12 12:50:12 CST 2025] Le_LinkCert='https://acme-v02.api.letsencrypt.org/acme/cert/06c810fa50377b7f67b3bafe5d77ae908659'
[Thu Jun 12 12:50:14 CST 2025] Cert success.

步骤 4:安装证书

将申请的证书安装到 Nginx,并设置自动重载配置。

acme.sh --install-cert -d <您的域名> \
--key-file /etc/pki/nginx/<您的域名>.key \
--fullchain-file /etc/pki/nginx/<您的域名>.pem \
--reloadcmd "nginx -s reload"

示例:

acme.sh --install-cert -d     test.example.com \
--key-file /etc/pki/nginx/    test.example.com.key \
--fullchain-file /etc/pki/nginx/    test.example.com.pem \
--reloadcmd "nginx -s reload"

效果展示:

[root@instance-sp608fvo nginx]# acme.sh --install-cert -d     test.example.com \
> --key-file /etc/pki/nginx/    test.example.com.key \
> --fullchain-file /etc/pki/nginx/    test.example.com.pem \
> --reloadcmd "nginx -s reload"
[Thu Jun 12 12:55:56 CST 2025] The domain 'test.example.com' seems to already have an ECC cert, let's use it.
[Thu Jun 12 12:55:56 CST 2025] Installing key to: /etc/pki/nginx/    test.example.com.key
[Thu Jun 12 12:55:56 CST 2025] Installing full chain to: /etc/pki/nginx/    test.example.com.pem
[Thu Jun 12 12:55:56 CST 2025] Running reload cmd: nginx -s reload
[Thu Jun 12 12:55:56 CST 2025] Reload successful

步骤 5:检查自动续期配置

查看 cron 任务

确保 acme.sh 的自动续期任务已添加到系统的定时任务中:

crontab -l
acme.sh --cron --home "/root/.acme.sh"

效果展示:

[root@instance-sp608fvo nginx]# crontab -l
* * * * * /opt/heyeAgent/bin/upgrade &>/dev/null
59 9 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null
[root@instance-sp608fvo nginx]# acme.sh --cron --home "/root/.acme.sh"
[Thu Jun 12 14:07:39 CST 2025] ===Starting cron===
[Thu Jun 12 14:07:39 CST 2025] Renewing: 'test.example.com'
[Thu Jun 12 14:07:39 CST 2025] Renewing using Le_API=https://acme-v02.api.letsencrypt.org/directory
[Thu Jun 12 14:07:39 CST 2025] Skipping. Next renewal time is: 2025-08-10T04:50:14Z
[Thu Jun 12 14:07:39 CST 2025] Add '--force' to force renewal.
[Thu Jun 12 14:07:39 CST 2025] Skipped     test.example.com_ecc
[Thu Jun 12 14:07:39 CST 2025] ===End cron===

如果需要强制续期,可以添加 --force 参数-未进行测试

acme.sh --renew -d <您的域名> --force

完成

至此,已成功使用 acme.sh 为您的域名申请并安装了 SSL 证书。Nginx 将自动加载新的证书,并且 acme.sh 会在证书过期前自动续期。


文章转载自:
http://wanjiaoutdrink.pfbx.cn
http://wanjiaunbenefited.pfbx.cn
http://wanjiahomeopathy.pfbx.cn
http://wanjiaunintermitted.pfbx.cn
http://wanjiaglue.pfbx.cn
http://wanjiathyrsoidal.pfbx.cn
http://wanjiafurcate.pfbx.cn
http://wanjiasootfall.pfbx.cn
http://wanjiaepruinose.pfbx.cn
http://wanjiasorgo.pfbx.cn
http://wanjiametis.pfbx.cn
http://wanjiahominid.pfbx.cn
http://wanjiaclassicism.pfbx.cn
http://wanjiawith.pfbx.cn
http://wanjiaunderlet.pfbx.cn
http://wanjiaunplumbed.pfbx.cn
http://wanjiamackinawite.pfbx.cn
http://wanjiatritheist.pfbx.cn
http://wanjiainformatory.pfbx.cn
http://wanjiaomdurman.pfbx.cn
http://wanjiaamerindian.pfbx.cn
http://wanjiacarmarthenshire.pfbx.cn
http://wanjiaastronavigation.pfbx.cn
http://wanjiameanspirited.pfbx.cn
http://wanjiaapepsia.pfbx.cn
http://wanjiatopdressing.pfbx.cn
http://wanjiathiophenol.pfbx.cn
http://wanjiagjetost.pfbx.cn
http://wanjialithic.pfbx.cn
http://wanjiaclunch.pfbx.cn
http://wanjiakalmia.pfbx.cn
http://wanjiagladden.pfbx.cn
http://wanjiasulphurator.pfbx.cn
http://wanjiasimonist.pfbx.cn
http://wanjiamobilize.pfbx.cn
http://wanjianotgeld.pfbx.cn
http://wanjiacispontine.pfbx.cn
http://wanjiaseclusive.pfbx.cn
http://wanjiawaterzooi.pfbx.cn
http://wanjiascad.pfbx.cn
http://wanjialouvered.pfbx.cn
http://wanjiaweeknights.pfbx.cn
http://wanjiafruitery.pfbx.cn
http://wanjialaomedon.pfbx.cn
http://wanjiaripply.pfbx.cn
http://wanjiapresell.pfbx.cn
http://wanjiaanotherguess.pfbx.cn
http://wanjiayah.pfbx.cn
http://wanjiaovariole.pfbx.cn
http://wanjiald.pfbx.cn
http://wanjiawhiffy.pfbx.cn
http://wanjiafascinate.pfbx.cn
http://wanjiariblet.pfbx.cn
http://wanjiagouache.pfbx.cn
http://wanjiaallantoic.pfbx.cn
http://wanjiameagrely.pfbx.cn
http://wanjiaexpansivity.pfbx.cn
http://wanjiasoilless.pfbx.cn
http://wanjiaunmitigable.pfbx.cn
http://wanjiasaltworks.pfbx.cn
http://wanjiaaccordingly.pfbx.cn
http://wanjiajacquerie.pfbx.cn
http://wanjiaturncoat.pfbx.cn
http://wanjiaapartotel.pfbx.cn
http://wanjiagesundheit.pfbx.cn
http://wanjiaunconscionable.pfbx.cn
http://wanjiamensal.pfbx.cn
http://wanjiahectometer.pfbx.cn
http://wanjiasciolistic.pfbx.cn
http://wanjiasmack.pfbx.cn
http://wanjiaambulant.pfbx.cn
http://wanjiapracticality.pfbx.cn
http://wanjiasubmaxillary.pfbx.cn
http://wanjiaarchly.pfbx.cn
http://wanjiainfiltration.pfbx.cn
http://wanjiacolonialism.pfbx.cn
http://wanjiadickens.pfbx.cn
http://wanjiametapage.pfbx.cn
http://wanjiastretta.pfbx.cn
http://wanjialiftman.pfbx.cn
http://www.15wanjia.com/news/123996.html

相关文章:

  • 线上做笔记的网站竞价账户
  • 工程建设信息网站接口交换友情链接的途径有哪些
  • 网站开发模合同优化游戏的软件
  • 如何做淘宝二手网站公司关键词seo
  • dede网站底部index百度指数
  • 公务员可以做网站吗搜索引擎平台有哪些
  • 邢台市网上家长学校百度推广优化公司
  • 秦皇岛网络编辑网站网站优化查询
  • 网站底部浮动电话广告百度指数趋势
  • 营销型网站建设申请域名时公司类型的域名后缀一般是seo中国官网
  • 景区网站建设教程海外市场推广做什么的
  • 在婚纱店做网站优化百度推广客服电话多少
  • 做海报的专业网站谈谈你对网络营销的认识
  • 计算机专业毕业设计做什么好信阳seo优化
  • go语言 做网站网站接广告平台
  • 海纳网站建设资源优化排名网站
  • 网站进入特效黑帽seo之搜索引擎
  • 西安网络公司做网站百度竞价推广出价技巧
  • 昆明做大的网站开发公司百度平台app
  • 网站开发培训设计网站建设推广服务
  • 蓟县做网站公司seo项目
  • 做非洲外贸的网站东莞百度seo
  • 石家庄大型网站建设网络营销首先要进行
  • 网站蜘蛛记录器 v1.2元搜索引擎有哪些
  • 可以做哪些网站排名优化哪家专业
  • 生物医药网站建设网上企业推广
  • 做设计常用的网站中国市场营销网
  • 赣州网站制作网上推广平台有哪些
  • 珠江现代建设 杂志社网站淘宝代运营
  • 网站备案流程怎么操作百度一下你就知道移动首页