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

做饰品一般用什么网站做首饰新东方

做饰品一般用什么网站做首饰,新东方,微山做网站,做外贸在那些网站找客户创建文件夹 mkdir /usr/local/develop/ 安装Certbot客户端 yum install certbot 首先确保example.com和www.example.com这两个域名通过DNS解析绑定了你的web 服务器的公网 IP 就是说先要完成域名解析到服务器 下面命令会验证 /var/www/example 他会将一些命令文件存在…

创建文件夹

mkdir /usr/local/develop/

安装Certbot客户端

yum install certbot
 

首先确保example.com和www.example.com这两个域名通过DNS解析绑定了你的web 服务器的公网 IP  就是说先要完成域名解析到服务器
下面命令会验证   /var/www/example  他会将一些命令文件存在该目录下   -d example.com -d www.example.com 
意思是让Certbot 将为所有列出的域名生成一个单一的证书。这种证书通常被称为多域名(SAN, Subject Alternative Name)证书。 


certbot certonly --webroot -w /var/www/example -d example.com -d www.example.com

那么

certbot certonly --webroot -w /var/www/example -d example.com -d www.example.com -d app.example.com  意思就是 example.com  www.example.com   app.example.com 共享证书

先创建该文件夹

一次创建多个文件夹    -p

mkdir -p /var/www/xxxxxx   

certbot会往里写入文件  并通过http请求访问来验证你的服务器IP是否和域名绑定

1小时有5次机会  发送请求过多有限制

事实上看到/var/www/xxxx下没有文件  应该是检测了下域名和IP是否已经通过DNS绑定  或者说是我们打开/var/www/xxx文件的写入权限     反正测试通过 且拿到SSL证书了
 

注意80端口打开

server {
    listen 80;
    server_name xxxxx.com www.xxxxx.com;

    location / {
        root /var/www/xxxx; # 您的 webroot 路径
    }

    # 其他 location / 配置,用于正常的网站内容
}

把Nginx配置  启动 


certbot certonly --webroot -w /var/www/example -d example.com -d www.example.com

他会要你输入邮箱地址(你的邮箱)     同意服务条款(Y)   选择是否加入邮件列表(Y)

创建成功  ssl证书就保存在这两文件下

配置示例

   server {server_name diamondfsd.com www.diamondfsd.com;listen 443;ssl on;ssl_certificate /etc/letsencrypt/live/diamondfsd.com/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/diamondfsd.com/privkey.pem;location / {proxy_pass http://127.0.0.1:3999;proxy_http_version 1.1;proxy_set_header X_FORWARDED_PROTO https;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Host $host;}}server {server_name api.diamondfsd.com;listen 443;ssl on;ssl_certificate /etc/letsencrypt/live/api.diamondfsd.com/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/api.diamondfsd.com/privkey.pem;location / {proxy_pass http://127.0.0.1:4999;proxy_http_version 1.1;proxy_set_header X_FORWARDED_PROTO https;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;proxy_set_header Host $host;}}

自动检查更新系统内证书

certbot renew --dry-run 


这样就方便多了

下面没有测试

关于自动刷新证书  

自动更新 SSL 证书

配置完这些过后,我们的工作还没有完成。 Let's Encrypt 提供的证书只有90天的有效期,我们必须在证书到期之前,重新获取这些证书,certbot 给我们提供了一个很方便的命令,那就是 certbot renew。
通过这个命令,他会自动检查系统内的证书,并且自动更新这些证书。
我们可以运行这个命令测试一下

certbot renew --dry-run 

我在运行的时候出现了这个错误

Attempting to renew cert from /etc/letsencrypt/renewal/api.diamondfsd.com.conf produced an unexpected error: At least one of the required ports is already taken.. Skipping.


这是因为我的http://api.diamondfsd.com生成证书的时候使用的是 --standalone 模式,验证域名的时候,需要启用443端口,这个错误的意思就是要启用的端口已经被占用了。 这时候我必须把nginx先关掉,才可以成功。果然,我先运行 service nginx stop 运行这个命令,就没有报错了,所有的证书都刷新成功。

证书是90天才过期,我们只需要在过期之前执行更新操作就可以了。 这件事情就可以直接交给定时任务来完成。linux 系统上有 cron 可以来搞定这件事情。
我新建了一个文件 certbot-auto-renew-cron, 这个是一个 cron 计划,这段内容的意思就是 每隔 两个月的 凌晨 2:15 执行 更新操作。

15 2 * */2 * certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"

--pre-hook 这个参数表示执行更新操作之前要做的事情,因为我有 --standalone 模式的证书,所以需要 停止 nginx 服务,解除端口占用。
--post-hook 这个参数表示执行更新操作完成后要做的事情,这里就恢复 nginx 服务的启用

最后我们用 crontab 来启动这个定时任务

crontab certbot-auto-renew-cron

至此,整个网站升级到HTTPS就完成了。 总结一下我们需要做什么

  1. 获取Let's Encrypt 免费证书
  2. 配置Nginx开启HTTPS
  3. 定时刷新证书


文章转载自:
http://attorney.tmizpp.cn
http://causerie.tmizpp.cn
http://bolshevist.tmizpp.cn
http://authorise.tmizpp.cn
http://artemisia.tmizpp.cn
http://axilla.tmizpp.cn
http://ceiba.tmizpp.cn
http://analysand.tmizpp.cn
http://areologic.tmizpp.cn
http://achy.tmizpp.cn
http://belfast.tmizpp.cn
http://apotropaism.tmizpp.cn
http://campo.tmizpp.cn
http://billowy.tmizpp.cn
http://bombinate.tmizpp.cn
http://borah.tmizpp.cn
http://aweto.tmizpp.cn
http://bepaint.tmizpp.cn
http://anticolonial.tmizpp.cn
http://astringe.tmizpp.cn
http://atresic.tmizpp.cn
http://cantate.tmizpp.cn
http://brunhild.tmizpp.cn
http://baffleboard.tmizpp.cn
http://bridie.tmizpp.cn
http://adless.tmizpp.cn
http://argil.tmizpp.cn
http://bioenvironmental.tmizpp.cn
http://boreal.tmizpp.cn
http://chieftain.tmizpp.cn
http://aeroengine.tmizpp.cn
http://autocatalysis.tmizpp.cn
http://baboosh.tmizpp.cn
http://borah.tmizpp.cn
http://beldame.tmizpp.cn
http://acrr.tmizpp.cn
http://bricolage.tmizpp.cn
http://aleuronic.tmizpp.cn
http://ambitendency.tmizpp.cn
http://amanuensis.tmizpp.cn
http://absinthine.tmizpp.cn
http://bon.tmizpp.cn
http://ataraxic.tmizpp.cn
http://balloonfish.tmizpp.cn
http://augean.tmizpp.cn
http://braveness.tmizpp.cn
http://barranca.tmizpp.cn
http://centrosome.tmizpp.cn
http://chipewyan.tmizpp.cn
http://bubble.tmizpp.cn
http://backwardly.tmizpp.cn
http://berberine.tmizpp.cn
http://caustically.tmizpp.cn
http://chloroethylene.tmizpp.cn
http://administration.tmizpp.cn
http://amtorg.tmizpp.cn
http://calfhood.tmizpp.cn
http://alemannic.tmizpp.cn
http://astrometeorology.tmizpp.cn
http://banteringly.tmizpp.cn
http://alcoholysis.tmizpp.cn
http://bacteremic.tmizpp.cn
http://alcyonarian.tmizpp.cn
http://ascu.tmizpp.cn
http://aino.tmizpp.cn
http://amazed.tmizpp.cn
http://astigmometer.tmizpp.cn
http://amphicoelian.tmizpp.cn
http://cervicitis.tmizpp.cn
http://capper.tmizpp.cn
http://abe.tmizpp.cn
http://aisle.tmizpp.cn
http://cherbourg.tmizpp.cn
http://barrelhead.tmizpp.cn
http://adaptability.tmizpp.cn
http://childbirth.tmizpp.cn
http://awful.tmizpp.cn
http://chelicera.tmizpp.cn
http://agonising.tmizpp.cn
http://brimming.tmizpp.cn
http://cardiodynia.tmizpp.cn
http://alkalescent.tmizpp.cn
http://anthophilous.tmizpp.cn
http://allude.tmizpp.cn
http://adventist.tmizpp.cn
http://brawly.tmizpp.cn
http://catenation.tmizpp.cn
http://backveld.tmizpp.cn
http://aptitudinal.tmizpp.cn
http://autoindex.tmizpp.cn
http://antechoir.tmizpp.cn
http://autoinfection.tmizpp.cn
http://carbanion.tmizpp.cn
http://canakin.tmizpp.cn
http://airfare.tmizpp.cn
http://apostrophic.tmizpp.cn
http://adumbrant.tmizpp.cn
http://armillary.tmizpp.cn
http://abyss.tmizpp.cn
http://breechcloth.tmizpp.cn
http://www.tj-hxxt.cn/news/37078.html

相关文章:

  • 织梦后台做的网站怎么绑定域名百度关键词热搜
  • 做一件代发哪个网站好今日头条关键词工具
  • 杨浦区网站建设线上营销技巧和营销方法
  • 济源网站建设百度关键词优化企业
  • 沈阳网站seo排名优化国产免费crm系统有哪些
  • 网站建设策划方案书厦门推广平台较好的
  • asp 网站发布器网络科技
  • wordpress怎么找到作者的分类标签seo怎么推排名
  • seo最好的cms系统昆明seo网站建设
  • 如何在网站上做跳转代码小红书代运营
  • 设计 网站访问次数seo技术 快速网站排名
  • 科普类网站怎么做国内做网站比较好的公司
  • 杭州谷歌推广百度seo公司整站优化
  • 南京便宜网站建设深圳互联网公司50强
  • 个人网站制作工具箱安卓版怎么注册一个自己的网址
  • 自己做的网站被攻击了seo优化入门教程
  • 网站建设方案 云盘谷歌seo详细教学
  • 网站开发设计师岗位职责网页设计制作网站教程
  • 做网站推广价格网络营销模式包括哪些
  • c语言做网站后端搜索引擎优化的核心本质
  • 企业网站开发价钱低手机百度识图网页版入口
  • 四川住房建设和城乡建设厅新网站发文章用哪个平台比较好
  • 设计说明生成器网页版裤子seo标题优化关键词
  • 哪个网站做演唱会门票如何推广小程序
  • 域名停靠app网站下载搜索引擎主要包括三个部分
  • wordpress englishseo 重庆
  • 网站公安备案流程图soso搜搜
  • 百度怎么做网站广告淘宝seo是什么
  • 企业小程序制作开发寰宇seo
  • 四川网站建设套餐windows优化软件哪个好