certbot --nginx 出现 UnicodeDecodeError: 'ascii' 解决方法
阿里云最高1888元代金券领取
开源微信小程序商城 NideShop
配置微信小程序 https 时,执行 certbot --nginx
选择域名后,出现如下错误:
Cleaning up challenges
An unexpected error occurred:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 2: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.
原因和解决方法:
nginx.conf 配置文件上有中文注释
server {
listen 80;
server_name nideshop.com www.nideshop.com; # 改成你自己的域名
root /var/www/nideshop/www;
set $node_port 8360;
把中文注释删除,并重启 nginx
systemctl restart nginx
重新执行 certbot --nginx