Response: <urlopen error [Errno -2] Name or service not known>

来源:16-3 申请免费https证书 和 上程序送审步骤

慕妹4270370

2019-07-14

老师我做到这一步 出错了

[root@iZbp1i0t9v2ixxhu5e9tewZ https]# openssl req -new -sha256 -key domain.key -subj "/" -reqexts SAN -config <(cat /etc/pki/tls/openssl.cnf <(printf "[SAN]\nsubjectAltName=DNS:shlianggu.com")) > domain.csr
[root@iZbp1i0t9v2ixxhu5e9tewZ https]# sudo service nginx reload
Redirecting to /bin/systemctl reload  nginx.service
[root@iZbp1i0t9v2ixxhu5e9tewZ https]# python acme_tiny.py --account-key ./account.key --csr ./domain.csr --acme-dir /root/data/www/challenges/ > ./signed.crt
Parsing account key...
Parsing CSR...
Found domains: shlianggu.com
Getting directory...
Directory found!
Registering account...
Already registered!
Creating new order...
Order created!
Verifying shlianggu.com...
Traceback (most recent call last):
  File "acme_tiny.py", line 198, in <module>
    main(sys.argv[1:])
  File "acme_tiny.py", line 194, in main
    signed_crt = get_crt(args.account_key, args.csr, args.acme_dir, log=LOGGER, CA=args.ca, disable_check=args.disable_check, directory_url=args.directory_url, contact=args.contact)
  File "acme_tiny.py", line 143, in get_crt
    raise ValueError("Wrote file to {0}, but couldn't download {1}: {2}".format(wellknown_path, wellknown_url, e))
ValueError: Wrote file to /root/data/www/challenges/PXIvuNw23K76su8sHFvxeqHHEszsGBUn7X8wN5gs-g0, but couldn't download http://shlianggu.com/.well-known/acme-challenge/PXIvuNw23K76su8sHFvxeqHHEszsGBUn7X8wN5gs-g0: Error:
Url: http://shlianggu.com/.well-known/acme-challenge/PXIvuNw23K76su8sHFvxeqHHEszsGBUn7X8wN5gs-g0
Data: None
Response Code: None
Response: <urlopen error [Errno -2] Name or service not known>
[root@iZbp1i0t9v2ixxhu5e9tewZ https]# 

什么原因?

我的配置:

vim /etc/nginx/conf.d/order.conf

server {
        listen 80;
        server_name shlianggu.com;

        location /.well-known/acme-challenge/ {
                alias /root/data/www/challenges/;
                try_files $uri =404;
        }

        location /static {
                alias  /root/data/www/Order/web/static/;
        }
        location / {
                try_files $uri @yourapplication;
        }

        location @yourapplication{
                include uwsgi_params;
                uwsgi_pass unix:/root/data/www/logs/order.sock;
        }

}
[root@iZbp1i0t9v2ixxhu5e9tewZ challenges]# pwd
/root/data/www/challenges
[root@iZbp1i0t9v2ixxhu5e9tewZ challenges]# ll
total 4
-rwxrwxrwx 1 root root 87 Jul 14 14:10 PXIvuNw23K76su8sHFvxeqHHEszsGBUn7X8wN5gs-g0
[root@iZbp1i0t9v2ixxhu5e9tewZ challenges]# 

图片描述

写回答

1回答

编程浪子

2019-07-14

你好

你的域名没有正常解析

//img.mukewang.com/szimg/5d2b428e09be4b8311520424.jpg

0
1
慕妹4270370
非常感谢!多谢
2019-07-15
共1条回复

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1729 学习 · 1913 问题

查看课程