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

营销网站建设选择原则创建app平台

营销网站建设选择原则,创建app平台,广告牌图片100例,有道云笔记WordPress使用acme自动续签免费的SSL 安装acme.sh颁发域名将证书安装到nginx下配置nginx的ssl自动续签 这里只进行最简单的操作 安装acme.sh 进入你的用户目录,如果你使用root登陆,那么你的用户目录就是 /root/ curl https://get.acme.sh | sh -s emailmyexam…

使用acme自动续签免费的SSL

  • 安装acme.sh
  • 颁发域名
  • 将证书安装到nginx下
  • 配置nginx的ssl
  • 自动续签

这里只进行最简单的操作

安装acme.sh

进入你的用户目录,如果你使用root登陆,那么你的用户目录就是 /root/

curl  https://get.acme.sh | sh -s email=my@example.com

这里会在root下生成一个 .acme.sh 文件夹
注意:.开头的文件夹使用ll命令看不见,需要加一个参数-a
命令如下

cd ~
ll -a

颁发域名

# 进入脚本目录
cd ~/.acme.sh
# 执行签发
acme.sh --issue -d 你的域名 -w 你的网站根目录地址

出现如下,则算是成功
在这里插入图片描述

将证书安装到nginx下

生成证书后,需要将证书安装/复制到您的 Apache/Nginx 或其他服务器。必须使用此命令将证书安装到目标文件,
请勿使用~/.acme.sh/文件夹中的证书文件,它们仅供内部使用,文件夹结构将来可能会更改。
命令如下

acme.sh --install-cert -d 域名 \
--key-file       /证书key存放路径/域名.key.pem  \
--fullchain-file /证书key存放路径/域名.cert.pem \
--reloadcmd     "nginx重启命令"

例如:

acme.sh --install-cert -d test.ywbj.cc \
--key-file         /home/wwwroot/ssl/51ebook.top.key.pem  \
--fullchain-file  /home/wwwroot/ssl/51ebook.top.cert.pem \
--reloadcmd     "service nginx force-reload"

配置nginx的ssl

server
{listen 80;server_name 51ebook.top;return 301 https://$server_name$request_uri;
}
server {listen 443 http2;server_name 51ebook.top;root /home/wwwroot/books;index index.html index.htm index.php default.html default.htm default.php;ssl_certificate /home/wwwroot/ssl/51ebook.top.cert.pem;ssl_certificate_key /home/wwwroot/ssl/51ebook.top.key.pem;ssl_session_timeout 5m;ssl_protocols TLSv1 TLSv1.1 TLSv1.2;ssl_prefer_server_ciphers on;ssl_ciphers "EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";ssl_session_cache builtin:1000 shared:SSL:10m;# .well-known block for Let's Encryptlocation ^~ /.well-known/acme-challenge/ {default_type "text/plain";try_files $uri =404;  # Ensure the file actually exists or serve a 404 error}# WordPress configinclude rewrite/wordpress.conf;# PHP path info supportinclude enable-php-pathinfo.conf;# Nginx status pagelocation /nginx_status {stub_status on;access_log off;}# Cache control for static fileslocation ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {expires 30d;}location ~ .*\.(js|css)?$ {expires 12h;}# Deny access to hidden fileslocation ~ /\.{deny all;}access_log /home/wwwlogs/51ebook.top/acc.log;error_log /home/wwwlogs/51ebook.top/err.log warn;
}

自动续签

自动续签不需要做任何操作,acme已经处理好了,可以通过命令查看

crontab -l

有一段类似的代码

56 0 * * * “/root/.acme.sh”/acme.sh --cron --home “/root/.acme.sh” > /dev/null

参考网站:https://blog.csdn.net/weixin_52270081/article/details/126777550

http://www.mnyf.cn/news/43664.html

相关文章:

  • 怎么做网站需求分析建站之星网站
  • 广告行业网推广优化关键词
  • 做性的视频网站珠海seo排名收费
  • 石油化工建设工程网站全球搜索网站排名
  • wordpress注入漏洞关键词优化怎么弄
  • 做图模板网站有哪些内容落实20条优化措施
  • 淘客网站怎么建立百度手机极速版
  • 常用来做网站的首页销售培训
  • 查看网站用什么语言做的洛阳seo网站
  • 做俄罗斯网站优化大师官网下载安装
  • 上传到网站根目录重庆seo优化公司
  • 深圳工业设计公司推荐如何优化seo
  • 沧州网站建设刘磊企业seo的措施有哪些
  • 做我女朋友恶搞网站如何在百度做推广
  • icp备案网站名称百度词条搜索排行
  • 嘉兴做营销型网站网站推广公司推荐
  • 如何做网站么口碑营销的主要手段有哪些
  • 公司网站是怎么制作和维护的企业网站优化服务公司
  • 中国世界排名前100的大学公司搜索seo
  • 网络推广的网站网站推广seo设置
  • 沈阳做微网站的公司百度助手下载安装
  • 做网站还是做阿里网络营销方法有哪些举例
  • 专业做视频的网站关键词林俊杰免费听
  • 网站后台怎么添加图片免费发布产品的网站
  • 凡客建站登录南宁seo外包要求
  • 厦门网站排名优化价格搜索引擎优化的英语简称
  • 二级建造师官网查询系统福建seo
  • 代做毕业设计找哪个网站百度账号购买网站
  • 在线p图网页seo搜索引擎优化工程师招聘
  • 定制网站建设公司哪家好央视新闻今天的内容