文章内容
2019/3/28 14:24:21,作 者: 黄兵
Can not find conf file for domain
最近在使用acme.sh生成证书的时候报如下错误:
Can not find conf file for domain
之后查了一下github的问题回答,地址在这里:Nginx mode :: Can not find conf file for domain,最终解决了问题,具体解决方案如下:
nginx.conf
配置片段:
root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name _; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; }
之后修改server_name:
root /var/www/html; # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name xx.mrools.com; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; }
之后再次运行acme.sh,已经成功申请到了证书,截图如下:
参考资料:
1、acme.sh
哈哈 on 回复 有用(0)
修改的server_name xx.mrools.com;这块xx.mrools.com指什么?这是你的域名吗?还是不管什么域名都这样写
游客3i>g on 2020-03-13 22:04:02
博主回复:是自己的域名。