๋ฌด๋ฃ๋ก ๋ด ๋ธ๋ก๊ทธ์ SSL[HTTPS] ์ ์ฉํ๊ธฐ - 2
์ด์ ๊ธ : ๋ฌด๋ฃ๋ก ๋ด ๋ธ๋ก๊ทธ์ SSL[HTTPS] ์ ์ฉํ๊ธฐ
์ด์ ๊ธ์ ์์ฑํ ๊ฒ ์ฒ๋ผ Github Pages ๋ธ๋ก๊ทธ์ Cloudflare๋ฅผ ์ ์ฉํ์ฌ ์ด์ฉํ๊ณ ์์๋๋ฐ ๊ตญ๋ด์์ Cloudflare๋ฅผ ์๋น์ค์ ์ด์ฉํ๋ฉด ๊ฝค ๋๋ ค์ง ์ ์๋ค๋ ๋๊ธ์๋ณด๊ณ ํ์์ ๋ธ๋ก๊ทธ๋ฅผ ๋ชจ๋ํฐ๋ง์ ํด๋ณด์๋๋ฐ ์ฒด๊ฐ์ ๊ฝค๋ ๋๋ ค์ง์ด ๋๊ปด์ก๋ค.
์ด ๊ธ์์๋ ํ์๊ฐ ์๋กญ๊ฒ ๋ธ๋ก๊ทธ์ ์ ์ฉํ Github Pages ๋ธ๋ก๊ทธ ์ด์ฉ์๋ฅผ ์ํ HTTPS ์ ์ฉ๋ฐฉ๋ฒ์ ์๊ฐํ๋ ค๊ณ ํ๋ค.
HTTPS๋ฅผ ์ ์ฉํ๊ธฐ ์ ๊ณผ ๊ฑฐ์ ์ฐจ์ด์๋ ์๋๋ฅผ ๋ํ๋ธ๋ค.
์ ํ ์กฐ๊ฑด
- ์ปค์คํ ๋๋ฉ์ธ ์ฌ์ฉ์์ฌ์ผํ๋ค. (github.io ๋๋ฉ์ธ์ ์ด๋ฏธ https๊ฐ ์ ์ฉ๋๊ณ ์์)
- Cloudflare ๋ฑ HTTPS ์๋น์ค๊ฐ ์ ์ฉ๋๊ณ ์์ง ์์์ผํ๋ค. (๋ธ๋ก๊ทธ ์ฃผ์๊ฐ http:// ๋ก ์์๋๋ ์ฃผ์์ฌ์ผํจ)
1. ๋๋ฉ์ธ ์๋น์ค์ ๋ ์ฝ๋ ์ถ๊ฐ
godaddy์ ๊ฐ์ ํ์๊ฐ ์ด์ฉํ๋ ์ปค์คํ ๋๋ฉ์ธ ์๋ฒ์์ DNS๊ด๋ฆฌ ๋ฉ๋ด์ ๋ค์ด๊ฐ๋ค. ๊ธฐ์กด์ ์ค์ ๋์ด์๋ A ์ ํ์ ๋ ์ฝ๋์ ๊ฐ์ ์๋์ ๊ฐ๋ค ์ค ํ๋๋ก ๋ณ๊ฒฝ ๋๋ ์ถ๊ฐ ํด์ค๋ค.
185.199.108.153
185.199.109.153
185.199.110.153
185.199.111.153
ํ์๋ 185.199.108.153
๋ฅผ ์ฌ์ฉํ์๋ค.

bash์์ dig ๋ช ๋ น์ด๋ฅผ ํตํด ๋ ์ฝ๋ ์ ์ฉ์ฌ๋ถ๋ฅผ ํ์ธ ํ ์ ์๋ค.
$ dig suitee.me +nostats +nocomments +nocmd
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> suitee.me +nostats +nocomments +nocmd
;; global options: +cmd
;suitee.me. IN A
suitee.me. 600 IN A 185.199.108.153
$ dig suitelab.github.io +nostats +nocomments +nocmd
; <<>> DiG 9.11.3-1ubuntu1.1-Ubuntu <<>> suitelab.github.io +nostats +nocomments +nocmd
;; global options: +cmd
;suitelab.github.io. IN A
suitelab.github.io. 600 IN A 185.199.108.153
dig ๋ช
๋ น์ด์์ ๋ณธ์ธ์ ๋ธ๋ก๊ทธ ์๋ณธ ์ฃผ์ {username}.github.io`` ์ ์ปค์คํ
๋๋ฉ์ธ
example.com`์ ip ๊ฐ(ex: 185.199.108.153)์ด ๊ฐ์ผ๋ฉด ์ฑ๊ณต์ด๋ค.
์ ์ฉ๊น์ง๋ ์๊ฐ์ด ์กฐ๊ธ ๊ฑธ๋ฆฌ๋ ๊ฒ ๊ฐ๋ค. (์์ญ๋ถ ~ 24์๊ฐ)
2. ๋ธ๋ก๊ทธ์ Github Repository์ Settings ๋ณ๊ฒฝ
๋ณธ์ธ ๋ธ๋ก๊ทธ์ repo์ ์ค์ ์ผ๋ก ์ด๋ํ๋ค.

Github Pages ํญ๋ชฉ์์ Enforce HTTPS ํญ๋ชฉ์ ์ฒดํฌํ๋ค.

๊ทธ๋ฆฌ๊ณ Custom domain ์นธ์ ๋๋ฉ์ธ ์ฃผ์๋ฅผ ์ง์ฐ๊ณ Save ์๋ก๊ณ ์นจ ํ ๋๋ฉ์ธ ์ฃผ์๋ฅผ ์ฑ์ฐ๊ณ Save ํ๋ค. domain์ ์ญ์ ๋ฐ ์ ์ฅํด์ผ DNS ๋ณ๊ฒฝ์ฌํญ์ด ๋ฐ์๋๋ค๊ณ ํ๋ค.

Your site is published at https://example.com/
๋ผ๋ ๋ฉ์์ง๊ฐ ๋ณด์ด๋ฉด ์ฑ๊ณต์ด๋ค!
์ด ๋ํ ์ ์ฉ๊น์ง๋ ์๊ฐ์ด ์กฐ๊ธ ๊ฑธ๋ฆฌ๋ ๊ฒ ๊ฐ๋ค. (์์ญ๋ถ ~ 24์๊ฐ)
3. ๊ฒฐ๊ณผ ํ์ธ
์๋ฆ๋ค์ด ์ด๋ก์ ์๋ฌผ์ ์ ํจ๊ป Letโs Encrypt ์ธ์ฆ์๊ฐ ๋ณด์ธ๋ค.

4. ๊ธฐํ ํ์ธํ ์ฌํญ๋ค
๊ธ์ด ๊ธธ์ด์ง ๊ฒ ๊ฐ์ ๋ค๋ฃจ์ง ์์ ์ฌํญ๋ค์ด๋ค. ํ์์ ๊ฒ์์ ํตํด ์ค์ ํด๋๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค.
- Google Search Console์์ https ์ถ๊ฐ
- Google Analytics https์ค์
- ๊ธฐํ https๋ก ์ ํํ์ ์ ๋ณ๊ฒฝํด์ ํ ๊ฒ๋ค