nginx
/etc/nginx/conf.d/RussianChurchVancouver.ca.conf
๋ด ๊ตฌ์ฑ์์ด ํธ์คํธ๊ฐ ์์ต๋๋ค.
server {
listen 80;
server_name RussianChurchVancouver.ca www.RussianChurchVancouver.ca;
...
root<strong i="18">@deb96</strong>:/var/www/RussianChurchVancouver.ca/web# certbot -m [email protected] --agree-tos --nginx -d RussianChurchVancouver.ca -d www.RussianChurchVancouver.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for russianchurchvancouver.ca
http-01 challenge for www.russianchurchvancouver.ca
nginx: [warn] conflicting server name "www.russianchurchvancouver.ca" on 0.0.0.0:80, ignored
nginx: [warn] conflicting server name "russianchurchvancouver.ca" on 0.0.0.0:80, ignored
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. russianchurchvancouver.ca (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://russianchurchvancouver.ca/.well-known/acme-challenge/b4vlj_zIdB4H_a94FlltJWx2JBGBDS_ihAFWrpJSl5U: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n", www.russianchurchvancouver.ca (http-01): urn:ietf:params:acme:error:unauthorized :: The client lacks sufficient authorization :: Invalid response from http://www.russianchurchvancouver.ca/.well-known/acme-challenge/B8e0i1p0jhjNtfV1Dd36rlE8eh4K2bpefVvABc6Na48: "<html>\r\n<head><title>404 Not Found</title></head>\r\n<body>\r\n<center><h1>404 Not Found</h1></center>\r\n<hr><center>nginx</center>\r\n"
๋ฌธ์ ๋ฅผ ํด๊ฒฐํ๋ ๋์ certbot์ด์ด ๊ตฌ์ฑ ํ์ผ์ acme-challenge๋ฅผ ์ถ๊ฐํ๋ ๊ฒ์ ๋ฐ๊ฒฌํ์ต๋๋ค.
Writing nginx conf tree to /etc/nginx/conf.d/default.conf
๊ทธ๊ฒ์ ๋ฒ๊ทธ์
๋๋ค. ๊ทธ๋์ ๋ก๊ทธ์ conflicting server name
๊ฐ ์์ต๋๋ค ( default.conf
์ RussianChurchVancouver.ca.conf
russianchurchvancouver.ca
๊ฐ์์ ๋ certbot ์์ฑ ์ํฉ
์ด ํ์ผ์ acme-challenge๋ฅผ ์ถ๊ฐ ํ ๊ฒ์ผ๋ก ์์๋ฉ๋๋ค.
/etc/nginx/conf.d/RussianChurchVancouver.ca.conf
์ด ์์ ์์ certbot์ด ๊ตฌ์ฑ ํ์ผ์ ๋๋ฉ์ธ์ด ์๋ฌธ์๊ฐ ์๋๊ธฐ ๋๋ฌธ์ ๊ทธ๋ ๊ฒํ๋ค๊ณ ์์ฌํ๊ธฐ ์์ํ์ต๋๋ค.
๊ทธ๋์ ์ ๋ ๊ทธ๋ค์ ์๋ฌธ์๋กํ์ต๋๋ค.
server_name russianchurchvancouver.ca www.russianchurchvancouver.ca;
certbot์ด ์ฌ๋ฐ๋ฅด๊ฒ ์๋ํ์ต๋๋ค.
root<strong i="37">@deb96</strong>:/etc/nginx/conf.d# certbot -m [email protected] --agree-tos --nginx -d russianchurchvancouver.ca,www.russianchurchvancouver.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for www.russianchurchvancouver.ca
http-01 challenge for russianchurchvancouver.ca
Waiting for verification...
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/nginx/conf.d/RussianChurchVancouver.ca.conf
Deploying Certificate to VirtualHost /etc/nginx/conf.d/RussianChurchVancouver.ca.conf
...
Congratulations! You have successfully enabled https://russianchurchvancouver.ca
and https://www.russianchurchvancouver.ca
์ ๊ณ ํด ์ฃผ์ ์ ๊ฐ์ฌํฉ๋๋ค. ๋ฒ๊ทธ์ ๋๋ค. ๋น์ ๋ง์ด ๋ง์์. ์ง๊ธ์ ์์ ์ ์ค์ ํ์ผ์ ์ฐ์ฌ์ง ๊ฒ๊ณผ ์ผ์ด์ค๋ฅผ ์ผ์น์ํค๋ ๊ฒ์ ๋๋ค.
์ด ๋ฌธ์ ๊ฐ ๊ณต๊ฐ ๋ ์ดํ๋ก Certbot์ ๋ง์ ๋ณ๊ฒฝ ์ฌํญ์ด ์์ต๋๋ค. Certbot์ ์ต์ ๋ฒ์ ์์ ์ฌ์ ํ์ด ๋ฌธ์ ๊ฐ ๋ฐ์ํ๋ ๊ฒฝ์ฐ ์๊ฒฌ์ ์ถ๊ฐํ์ฌ ์๋ ค์ฃผ์๊ฒ ์ต๋๊น? ์ด๋ฅผ ํตํด ์ฌ์ฉ์์๊ฒ ์ฌ์ ํ ์ํฅ์ ๋ฏธ์น๋ ๋ฌธ์ ๋ฅผ ๋ ์ ํ์ ํ ์ ์์ต๋๋ค. ํฅํ 30 ์ผ ๋์ ํ๋์ด ์์ผ๋ฉด์ด ๋ฌธ์ ๋ ์๋์ผ๋ก ์ข ๊ฒฐ๋ฉ๋๋ค.
์ด๊ฒ์ ์ฌ์ ํ โโ๋ฒ๊ทธ์ ๋๋ค.