certbot 을 설치해서 다음 명령어를 치니깐 위와 같은 오류가 떴습니다.
설치는 아래 방법대로 했습니다.
https://certbot.eff.org/#ubuntuxenial-nginx
# certbot certonly --webroot --webroot-path=/etc/nginx/ssl -d zibhapso.com -d www.zibhapso.com
certbot 설치해서 ssl 작업중인데 이런 오류는 왜 뜨는건지 혹시 아시나요^^;
root@linode:~# certbot certonly --webroot --webroot-path=/etc/nginx/ssl -d zibhapso.com -d www.zibhapso.com
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for zibhapso.com
http-01 challenge for www.zibhapso.com
Using the webroot path /etc/nginx/ssl for all unmatched domains.
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. www.zibhapso.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.zibhapso.com/.well-known/acme-challenge/2QwByR3pZr_X5fb7jZiyMlrGXw4k9tf1fqNIqWKkONM: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>", zibhapso.com (http-01): urn:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://zibhapso.com/.well-known/acme-challenge/o866JP-X7ZSqaD94lq6qSrHG7u4v9pLqCJWokw4Ujbo: "<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.zibhapso.com
Type: unauthorized
Detail: Invalid response from
http://www.zibhapso.com/.well-known/acme-challenge/2QwByR3pZr_X5fb7jZiyMlrGXw4k9tf1fqNIqWKkONM:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
Domain: zibhapso.com
Type: unauthorized
Detail: Invalid response from
http://zibhapso.com/.well-known/acme-challenge/o866JP-X7ZSqaD94lq6qSrHG7u4v9pLqCJWokw4Ujbo:
"<html>
<head><title>404 Not Found</title></head>
<body bgcolor="white">
<center><h1>404 Not Found</h1></center>
<hr><center>"
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address.
수정하려면, 도메인 네임서버의 DNS A레코드값이랑 아이피랑 맞는지 체크해봐라고 하는데,
제가 다른 서버에도 동일하게 설정했거든요. @_@;
Certbot을 잘못 설치했는지 @_@;
webroot path가 맞나요?
nginx에서 따로 설정을 해주지 않으면 /etc/nginx/ssl이 아니라 해당 계정 폴더 내에서
.well-known/acme-challenge/랜덤파일명을 찾습니다.
잘 보이지도 않는 .well-known 폴더를 여기저기 흘리고 다니게 되지요.
certbot이 전체적으로 좀 지저분한 프로그램입니다 ㅠㅠ