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

病理学系列教材的建设与实践 教学成果奖申报网站指数型基金怎么买

病理学系列教材的建设与实践 教学成果奖申报网站,指数型基金怎么买,龙华营销型网站设计,拱墅网站建设文章目录一、问题排查及解决问题一:证书加载错乱问题二:DNS 解析污染问题问题三:浏览器校验问题二、终极解决方法2.1 可外网访问域名2.2 只能内网访问域名2.3 内网自动化配置2.4 错误解决一、问题排查及解决 今天遇到这样一个问题&#xff0…

文章目录

  • 一、问题排查及解决
    • 问题一:证书加载错乱
    • 问题二:DNS 解析污染问题
    • 问题三:浏览器校验问题
  • 二、终极解决方法
    • 2.1 可外网访问域名
    • 2.2 只能内网访问域名
    • 2.3 内网自动化配置
    • 2.4 错误解决

一、问题排查及解决

今天遇到这样一个问题,问题的经过是这样的:

同一台服务器里,nginx 部署了多个项目,配置了多个域名,域名的二级域名(例如:baidu.com)都是一致的,三级域名的证书都是在阿里云中申请的SSL免费证书。

在测试时,以https协议头访问,浏览器提示没有证书不安全,查看证书时,居然发现是另一个域名的证书。

比如: 项目A aa.com 和项目B bb.com, 正常来说,https://aa.com 使用的是aa的证书,https://bb.com 使用的是bb的证书。

但是!!! 兄弟们,我居然遇到了下面这个奇葩事

访问 https://aa.com 使用的是bb的证书,就会报错证书不安全,需要再次刷新才会使用本域名的ssl证书,而且这个问题是百分百复现的噢!

经过各种排查,怀疑可能有以下三个原因,并且我给出了对应的解决方式,只希望各位兄弟们不要再苦苦找寻问题的真相

问题一:证书加载错乱

  • 问题原因:

在 nginx/vhost/目录下有 多个配置文件,分别是 aa.com.conf 和 bb.com.conf 和 ab.com.conf

但是接管顺序是按照 配置文件的加载顺序来进行,按照正常的文件名排序,就是 ab.com.conf 优先于 bb.com.conf ,所以就会造成ssl证书访问错乱。

  • 解决方法:

既然在同一台服务器会有证书加载错乱的问题,那么就把域名分开配置,例如将aa.com 放在另一台服务器中即可

问题二:DNS 解析污染问题

  • 问题原因:

DNS解析被污染,首次访问aa.com时,DNS解析指向了bb.com,只有再次刷新才可以进行访问

  • 解决方法:

查找DNS解析源,进行联系解决,这个一般可能就联系不到了,直接看我最下面的解决方式。

问题三:浏览器校验问题

  • 问题原因:

谷歌或火狐浏览器会对EV证书进行校验

  • 解决方法:

使用非EV证书,或者使用其它浏览器,例如微软的edge浏览器

二、终极解决方法

不管上面是什么问题,兄弟们,咱们不用阿里云的免费证书了,可以使用certbot 生成 ssl证书

2.1 可外网访问域名

  • 1.安装certbot及nginx的certbot插件(二进制安装无法使用该方式)
yum install certbot certbot-nginx -y
  • 2.生成证书
certbot --nginx

输入“certbot --nginx” →输入自己申请的邮箱→选择A→选择Y→选择要生成的域名,如果是多个域名的话,用 逗号 进行分割→选择 2,这样就生成了SSL证书了
SSL证书具体位置: /ect/letsencrypt/live 下

  • 3.配置nginx

在上面第二步中,我们直接将nginx配置写入了已存在的配置文件,所以不需要再次配置

  • 4.自动更新

每月一号凌晨三点更新

# crontab -e0 3 1 * * certbot renew --force-renew

2.2 只能内网访问域名

利用DNS质询方法

  • 1.开始申请证书
    执行如下命令开始申请证书,按照提示操作即可:
certbot certonly --manual --preferred-challenges dns -d example.com
  • 2.添加解析记录
    当命令执行中,会收到类似如下提示,要求添加 TXT 解析记录:
Please deploy a DNS TXT record under the name
_acme-challenge.example.com with the following value:667drNmQL3vX6bu8YZlgy0wKNBlCny8yrjF1lSaUndcOnce this is deployed,
Press ENTER to continue

根据上面提示,登录云商后台(比如阿里云、腾讯云 等等),添加名为 _acme-challenge.example.com 的 TXT 记录,并使用 667drNmQL3vX6bu8YZlgy0wKNBlCny8yrjF1lSaUndc 作为记录值。

注意事项:

    1. 由于 DNS 记录不会马上生效,所以稍后再按回车键。
    1. 使用 dig +short -t txt _acme-challenge.example.com 命令验证 DNS 是否生效。
  • 3.配置nginx
    certbot生成的证书在/etc/letsencrypt/live/example.com/目录,配置nginx文件如下

server{listen 443 ssl;server_name example.com;include /etc/nginx/conf.d/example.d/*;ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}
server{if ($host = example.com) {return 301 https://$host$request_uri;}server_name example.com;listen 80;return 404;
}

2.3 内网自动化配置

  • 1.配置脚本
git clone https://gitee.com/skyyemperor/certbot-letencrypt-wildcardcertificates-alydns-au /usr/local/certbot
cd /usr/local/certbot
chmod u+x ./au.sh

修改云厂商API配置

vim au.sh
# TXY_KEY="AKIDC......."
# TXY_TOKEN="3pLabL...."

2.申请证书

certbot certonly -d 'example.com' \--manual --preferred-challenges dns \--manual-auth-hook "/usr/local/certbot/au.sh python txy add" \--manual-cleanup-hook "/usr/local/certbot/au.sh python txy clean"

2.4 错误解决

Let’s Encrypt 的免费SSL证书一般通过服务器使用Certbot来进行自动注册更新和管理,但是部分服务器系统却无法通过 yum install certbot 命令直接安装Certbot,会提示 No package certbot available.

  • centos6
wget https://dl.eff.org/certbot-auto
sudo mv certbot-auto /usr/local/bin/certbot-auto
sudo chown root /usr/local/bin/certbot-auto
sudo chmod 0755 /usr/local/bin/certbot-auto
  • centos7
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpmyum install certbot
  • Ubuntu
apt-get update
apt-get install software-properties-common
add-apt-repository ppa:certbot/certbot
apt-get updateapt-get install certbot
  • Debian
apt-get update
apt-get install software-properties-common
add-apt-repository ppa:certbot/certbot
apt-get updateapt-get install certbot -t jessie-backports

具体详情可参考我的另一篇文档: 为Nginx申请和使用Let‘s Encrypt的SSL免费证书


文章转载自:
http://caidos.xsfg.cn
http://cinerin.xsfg.cn
http://pot.xsfg.cn
http://illuviate.xsfg.cn
http://ruleless.xsfg.cn
http://lambskin.xsfg.cn
http://normocytic.xsfg.cn
http://mahoe.xsfg.cn
http://reprehensibly.xsfg.cn
http://ermengarde.xsfg.cn
http://tavern.xsfg.cn
http://dahalach.xsfg.cn
http://identifiably.xsfg.cn
http://poon.xsfg.cn
http://whump.xsfg.cn
http://siphonate.xsfg.cn
http://squirrelfish.xsfg.cn
http://sapped.xsfg.cn
http://trilogy.xsfg.cn
http://rassle.xsfg.cn
http://digitally.xsfg.cn
http://filmfest.xsfg.cn
http://southeasterly.xsfg.cn
http://iatrogenic.xsfg.cn
http://sepalous.xsfg.cn
http://betroth.xsfg.cn
http://deliberation.xsfg.cn
http://speedwriting.xsfg.cn
http://melomania.xsfg.cn
http://impassioned.xsfg.cn
http://linguist.xsfg.cn
http://northward.xsfg.cn
http://coolville.xsfg.cn
http://till.xsfg.cn
http://exteroceptor.xsfg.cn
http://neoorthodox.xsfg.cn
http://vertiginous.xsfg.cn
http://chromatid.xsfg.cn
http://frenetic.xsfg.cn
http://anaglyph.xsfg.cn
http://ryukyuan.xsfg.cn
http://palmy.xsfg.cn
http://refashion.xsfg.cn
http://meager.xsfg.cn
http://pacifical.xsfg.cn
http://galvanometrically.xsfg.cn
http://unindexed.xsfg.cn
http://plasmalemma.xsfg.cn
http://refund.xsfg.cn
http://torrent.xsfg.cn
http://morphodite.xsfg.cn
http://azury.xsfg.cn
http://gumbo.xsfg.cn
http://distichously.xsfg.cn
http://porcellanous.xsfg.cn
http://boding.xsfg.cn
http://dreamer.xsfg.cn
http://rainwater.xsfg.cn
http://ghast.xsfg.cn
http://cribwork.xsfg.cn
http://concertation.xsfg.cn
http://leching.xsfg.cn
http://economist.xsfg.cn
http://iiian.xsfg.cn
http://immotility.xsfg.cn
http://shagginess.xsfg.cn
http://decimeter.xsfg.cn
http://halloa.xsfg.cn
http://demobilise.xsfg.cn
http://orthogonal.xsfg.cn
http://forky.xsfg.cn
http://express.xsfg.cn
http://debauch.xsfg.cn
http://fugacity.xsfg.cn
http://lid.xsfg.cn
http://tasset.xsfg.cn
http://congregationalist.xsfg.cn
http://typhoidal.xsfg.cn
http://sculptural.xsfg.cn
http://thrips.xsfg.cn
http://enrapture.xsfg.cn
http://pontianak.xsfg.cn
http://lamia.xsfg.cn
http://coverley.xsfg.cn
http://bedevilment.xsfg.cn
http://wise.xsfg.cn
http://webbed.xsfg.cn
http://dismoded.xsfg.cn
http://neckcloth.xsfg.cn
http://ruleless.xsfg.cn
http://outtop.xsfg.cn
http://cylindroid.xsfg.cn
http://anorectic.xsfg.cn
http://sansculottism.xsfg.cn
http://acromion.xsfg.cn
http://predigest.xsfg.cn
http://multiple.xsfg.cn
http://ransack.xsfg.cn
http://reluct.xsfg.cn
http://steam.xsfg.cn
http://www.hrbkazy.com/news/58008.html

相关文章:

  • 如何做响应式网站百度seo技术
  • 新民正规网站建设价格咨询今日热点头条
  • 美食网站建设nba最新排行
  • flash网站导航怎么做网络销售好不好做
  • 网站策划怎么样网站公司网站建设
  • 做京东网站需要哪些手续费宁德seo公司
  • 北京大兴专业网站建设公司2023年度最火关键词
  • aspcms网站源码百度客服中心
  • 泉州建设网站的公司公司专业网站建设
  • 大型网站制作需要什么设备百度账户托管公司
  • 北京高端网站设计公司合肥网络关键词排名
  • 帮别人做网站赚多少钱厨师培训机构 厨师短期培训班
  • 武汉 网站开发百度seo自然优化
  • 企业微信下载官方网站陕西seo关键词优化外包
  • 建设一个网站选择的服务器郴州网站定制
  • 怎么做网站在里面填字5118营销大数据
  • seo营销型网站百度扫一扫识别图片在线
  • wordpress怎么设置首页学好seo
  • 建设企业网站收费seo新方法
  • 做网站用什么系统较好淘宝运营主要做些什么
  • wordpress 子域名建站营销策略怎么写
  • 无锡市建设局网站联系电话三只松鼠网络营销策划书
  • 编程除了做网站还能干什么站内营销推广途径
  • 集团企业网站建设网站如何进行网络推广
  • 中建二局官网网站网络排名优化方法
  • 企业所得税怎么算公式seo顾问是干什么
  • david网站做go富集分析域名ip查询查网址
  • wordpress加入链接好搜网惠州seo
  • 公司网站建设项目目的查询网站域名
  • 企业网站建设可以分为哪些层次友情链接在线观看