最新消息:20210917 已从crifan.com换到crifan.org

【已解决】OneinStack添加ssl出错:Let’s Encrypt Verify error! DNS problem: NXDOMAIN looking up A for

OneinStack crifan 760浏览 0评论
折腾:
【未解决】用OneinStack去添加主机域名
期间,用OneinStack的vhost.sh去添加域名,其中使用ssl,结果出错:
[root@izj6cefkuu3496m71s907xz oneinstack]# ./vhost.sh

#######################################################################
#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit 
OneinStack - 一键PHP/JAVA安装工具
      # ####################################################################### What Are You Doing?         1. Use HTTP Only         2. Use your own SSL Certificate and Key         3. Use Let's Encrypt to Create SSL Certificate and Key         q. Exit Please input the correct option: 3 Please input domain(example: www.example.com ): www.xxx.com domain= www.xxx.com Please input the directory for the domain: www.xxx.com : (Default directory: /data/wwwroot/ www.xxx.com ): Virtual Host Directory=/data/wwwroot/ www.xxx.com Create Virtul Host directory...... set permissions of Virtual Host directory...... Do you want to add more domain name? [y/n]: y Type domainname or IP(example: example.com other.example.com ): xxx.com domain list= xxx.com Do you want to redirect from xxx.com to www.xxx.com? [y/n]: y Do you want to redirect all HTTP requests to HTTPS? [y/n]: y Let's Encrypt Verify error! DNS problem: NXDOMAIN looking up A for www.xxx.com [Sun Aug 26 22:44:04 CST 2018] Creating domain key [Sun Aug 26 22:44:04 CST 2018] The domain key is here: /root/.acme.sh/ www.xxx.com/www.xxx.com.key [Sun Aug 26 22:44:04 CST 2018] Multi domain='DNS: www.xxx.com,DNS:xxx.com ' [Sun Aug 26 22:44:04 CST 2018] Getting domain auth token for each domain [Sun Aug 26 22:44:04 CST 2018] Getting webroot for domain=' www.xxx.com ' [Sun Aug 26 22:44:04 CST 2018] Getting new-authz for domain=' www.xxx.com ' [Sun Aug 26 22:44:05 CST 2018] The new-authz request is ok. [Sun Aug 26 22:44:05 CST 2018] Getting webroot for domain=' xxx.com ' [Sun Aug 26 22:44:05 CST 2018] Getting new-authz for domain=' xxx.com ' [Sun Aug 26 22:44:06 CST 2018] The new-authz request is ok. [Sun Aug 26 22:44:06 CST 2018] Verifying: www.xxx.com [Sun Aug 26 22:44:10 CST 2018] Success [Sun Aug 26 22:44:10 CST 2018] xxx.com is already verified, skip http-01. [Sun Aug 26 22:44:10 CST 2018] Verify finished, start to sign. [Sun Aug 26 22:44:11 CST 2018] Cert success.
但是看到,也正常创建的了感觉。
Let’s Encrypt Verify error! DNS problem: NXDOMAIN looking up A for
OneinStack Let’s Encrypt Verify error! DNS problem: NXDOMAIN looking up A for
Letsencrypt 1.9.4 DNS Problem NXDOMAIN looking up A – Help – Let’s Encrypt Community Support
Detail: DNS problem: NXDOMAIN looking up A for www.ordyum.com – Help – Let’s Encrypt Community Support
https://community.letsencrypt.org/t/detail-dns-problem-nxdomain-looking-up-a-for-www-ordyum-com/56991
Letsencrypt DNS problem looking up A | DigitalOcean
Lets Encrypt 配置SSL错误 DNS problem: NXDOMAIN looking up A for xxx – Postbird – 招猫逗狗的开发者
解决OneinStack出现”DNS problem: NXDOMAIN looking…”问题 | 老左博客
解决Let’s Encrypt”DNS problem: NXDOMAIN looking up A..”配置问题 | 老左博客
➜  ~ ping 
xxx.com
PING 
xxx.com
 (47.52.190.220): 56 data bytes
64 bytes from 47.52.190.220: icmp_seq=0 ttl=48 time=39.419 ms
64 bytes from 47.52.190.220: icmp_seq=1 ttl=48 time=38.787 ms
^C
--- 
xxx.com
 ping statistics ---
2 packets transmitted, 2 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 38.787/39.103/39.419/0.316 ms
➜  ~
➜  ~ ping 
www.xxx.com
PING 
www.xxx.com
 (47.52.190.220): 56 data bytes
64 bytes from 47.52.190.220: icmp_seq=0 ttl=48 time=41.246 ms
64 bytes from 47.52.190.220: icmp_seq=1 ttl=48 time=41.395 ms
64 bytes from 47.52.190.220: icmp_seq=2 ttl=48 time=40.908 ms
^C
--- 
www.xxx.com
 ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 40.908/41.183/41.395/0.204 ms
好像没问题啊
去阿里云中
DNS域名是正常的。
参考:
解决OneinStack出现”DNS problem: NXDOMAIN looking…”问题 | 老左博客
去:
先删除vhost:
[root@izj6cefkuu3496m71s907xz oneinstack]# ./vhost.sh del

#######################################################################
#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit 
OneinStack - 一键PHP/JAVA安装工具
      # ####################################################################### Virtualhost list: www.xxx.com Please input a domain you want to delete: www.xxx.com Do you want to delete Virtul Host directory? [y/n]: y Press Ctrl+c to cancel or Press any key to continue... Domain: www.xxx.com has been deleted. [root@izj6cefkuu3496m71s907xz oneinstack]# ls /data/wwwroot/ xxx.com   default [root@izj6cefkuu3496m71s907xz oneinstack]# ls /data/wwwroot/ xxx.com/ [root@izj6cefkuu3496m71s907xz oneinstack]# rm -rf /data/wwwroot/ xxx.com/ [root@izj6cefkuu3496m71s907xz oneinstack]#
同时删除了多余的目录
再去升级OneinStack:
[root@izj6cefkuu3496m71s907xz oneinstack]# ./upgrade.sh 

#######################################################################
#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
#              Upgrade Software versions for OneinStack               #
#       For more information please visit 
OneinStack - 一键PHP/JAVA安装工具
      # ####################################################################### What Are You Doing?         1. Upgrade Nginx/Tengine/OpenResty/Apache         2. Upgrade MySQL/MariaDB/Percona         3. Upgrade PHP         4. Upgrade Redis         5. Upgrade Memcached         6. Upgrade phpMyAdmin         7. Upgrade OneinStack         8. Upgrade acme.sh         q. Exit Please input the correct option: oneinstack input error! Please only input 1~8 and q What Are You Doing?         1. Upgrade Nginx/Tengine/OpenResty/Apache         2. Upgrade MySQL/MariaDB/Percona         3. Upgrade PHP         4. Upgrade Redis         5. Upgrade Memcached         6. Upgrade phpMyAdmin         7. Upgrade OneinStack         8. Upgrade acme.sh         q. Exit Please input the correct option: 7 Congratulations! OneinStack upgrade successful! What Are You Doing?         1. Upgrade Nginx/Tengine/OpenResty/Apache         2. Upgrade MySQL/MariaDB/Percona         3. Upgrade PHP         4. Upgrade Redis         5. Upgrade Memcached         6. Upgrade phpMyAdmin         7. Upgrade OneinStack         8. Upgrade acme.sh         q. Exit Please input the correct option: q
再重新添加域名,这次:
  • 没有设置强制http转https
[root@izj6cefkuu3496m71s907xz oneinstack]# ./vhost.sh 

#######################################################################
#       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      #
#       For more information please visit 
OneinStack - 一键PHP/JAVA安装工具
      # ####################################################################### What Are You Doing?         1. Use HTTP Only         2. Use your own SSL Certificate and Key         3. Use Let's Encrypt to Create SSL Certificate and Key         q. Exit Please input the correct option: 3 Please input domain(example: www.example.com ): www.xxx.com domain= www.xxx.com Please input the directory for the domain: www.xxx.com : (Default directory: /data/wwwroot/ www.xxx.com ): Virtual Host Directory=/data/wwwroot/ www.xxx.com Create Virtul Host directory...... set permissions of Virtual Host directory...... Do you want to add more domain name? [y/n]: y Type domainname or IP(example: example.com other.example.com ): xxx.com domain list= xxx.com Do you want to redirect from xxx.com to www.xxx.com? [y/n]: y Do you want to redirect all HTTP requests to HTTPS? [y/n]: n [Tue Aug 28 20:28:24 CST 2018] Domains not changed. [Tue Aug 28 20:28:24 CST 2018] Skip, Next renewal time is: Thu Oct 25 14:44:12 UTC 2018 [Tue Aug 28 20:28:24 CST 2018] Add '--force' to force to renew. Do you want to add hotlink protection? [y/n]: y Allow Rewrite rule? [y/n]: y Please input the rewrite of programme : wordpress,opencart,magento2,drupal,joomla,laravel,thinkphp,pathinfo,discuz,typecho,ecshop,nextcloud rewrite was exist. (Default rewrite: other): wordpress You choose rewrite=wordpress Allow Nginx/Tengine/OpenResty access_log? [y/n]: y You access log file=/data/wwwlogs/ www.xxx.com_nginx.log nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful Reload Nginx...... ####################################################################### #       OneinStack for CentOS/RadHat 6+ Debian 7+ and Ubuntu 12+      # #       For more information please visit
OneinStack - 一键PHP/JAVA安装工具
      # ####################################################################### Your domain:                   www.xxx.com Virtualhost conf:             /usr/local/nginx/conf/vhost/ www.xxx.com.conf Directory of:                 /data/wwwroot/ www.xxx.com Rewrite rule:                 /usr/local/nginx/conf/rewrite/wordpress.conf Let's Encrypt SSL Certificate:/usr/local/nginx/conf/ssl/ www.xxx.com.crt SSL Private Key:              /usr/local/nginx/conf/ssl/ www.xxx.com.key [root@izj6cefkuu3496m71s907xz oneinstack]# ll /data/wwwroot/ total 8 drwxr-xr-x 3 www www 4096 Aug 26 21:57 default drwxr-xr-x 2 www www 4096 Aug 28 20:28 www.xxx.com [root@izj6cefkuu3496m71s907xz oneinstack]# ll /data/wwwroot/ www.xxx.com/ total 0 [root@izj6cefkuu3496m71s907xz oneinstack]#
可见,新建后的目录是空的,所以去加上一个html:
[root@izj6cefkuu3496m71s907xz 
www.xxx.com
]# cat index.html 
<!DOCTYPE HTML>
<html>
    <meta charset="utf-8">
    <title>xxx</title>
<body>
  <h1>测试 
xxx.com
 主页显示是否正常</h1>
</body>
</html>
[root@izj6cefkuu3496m71s907xz 
www.xxx.com
]# ll -lh
total 4.0K
-rw-r--r-- 1 root root 169 Aug 28 20:33 index.html
[root@izj6cefkuu3496m71s907xz 
www.xxx.com
]# 
然后去打开主页看看效果:
非https的http是OK的:
但是https都打不开:
【总结】
总之,此处通过:
(1)删除之前域名
./vhost.sh del
(2)升级OneinStack
显示:7. Upgrade OneinStack
输入:7
(3)重新创建域名
./vhost.sh
即可解决此处出现:
Let’s Encrypt Verify error! DNS problem: NXDOMAIN looking up A for
的问题。

转载请注明:在路上 » 【已解决】OneinStack添加ssl出错:Let’s Encrypt Verify error! DNS problem: NXDOMAIN looking up A for

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
94 queries in 0.203 seconds, using 23.35MB memory