Let’s Encrypt라는 비영리 기관을 통해 루트 도메인, 서브 도메인, 와일드 카드 도메인까지 무료로 발급 받을수 있음.
인증서 발급을 위해 certbot을 사용함.
참고 - https://www.vompressor.com/tls1/
sudo certbot certonly --standalone
mkdir /var/www/letsencrypt
sudo certbot certonly --webroot --webroot-path=/var/www/letsencrypt -d www.ssro.xyz
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Please enter in your domain name(s) (comma and/or space separated) (Enter 'c'
to cancel): www.test.xyz
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.test.xyz
Input the webroot for www.test.xyz: (Enter 'c' to cancel): /var/www/letsencrypt
Waiting for verification...
Challenge failed for domain www.test.xyz
http-01 challenge for www.test.xyz
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: www.test.xyz
Type: connection
Detail: xxx.xxx.xxx.xxx: Fetching
http://www.test.xyz/.well-known/acme-challenge/h-7pCiabj2FlVpKdT44TssmY_CSIl9dGC34-mqHNu_k:
Timeout during connect (likely firewall problem)
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. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
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 www.test.xyz
Using the webroot path /var/www/letsencrypt for all unmatched domains.
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/www.test.xyz/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/www.test.xyz/privkey.pem
Your cert will expire on 2022-12-19. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-leroot@mgmt:~# certbot certonly --manual \
--preferred-challenges dns \
--server https://acme-v02.api.letsencrypt.org/directory \
--agree-tos -m hong@gmail.com \
-d *.test.xyz
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Obtaining a new certificate
Performing the following challenges:
dns-01 challenge for ssro.xyz
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
NOTE: The IP of this machine will be publicly logged as having requested this
certificate. If you're running certbot in manual mode on a machine that is not
your server, please ensure you're okay with that.
Are you OK with your IP being logged?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please deploy a DNS TXT record under the name
_acme-challenge.test.xyz with the following value:
enI6urTmDwQt_r3_SHOTz1t60RAInB_BfdYm4nypaaw
Before continuing, verify the record is deployed.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Press Enter to Continue
Waiting for verification...
Cleaning up challenges
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/test.xyz/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/test.xyz/privkey.pem
Your cert will expire on 2022-12-22. To obtain a new or tweaked
version of this certificate in the future, simply run certbot
again. To non-interactively renew *all* of your certificates, run
"certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le30 4 * * 0 /usr/local/bin/certbot renew --quiet --post-hook "/usr/sbin/service nginx reload" > /dev/null 2>&1
30 4 * * 0 /usr/local/bin/certbot renew --quiet --post-hook "/usr/sbin/service apache2 restart" > /dev/null 2>&1