SSL 인증서 설치
좋은 설명을 주셨어요. 지금 상황은 워드프레스가 내부적으로 HTTPS 주소를 강제로 사용하고 있는데, 실제 서버는 HTTP만 열려 있어서 발생하는 문제입니다. 그래서 글을 클릭하면 https://makerskorean.kr/...로 리다이렉트되지만 SSL 인증서가 없거나 443 포트가 열려 있지 않아 “페이지 없음” 오류가 나는 겁니다.
🔎 원인 정리
- 워드프레스 주소 설정
설정 → 일반메뉴에서 워드프레스 주소(URL)와 사이트 주소(URL)가https://로 되어 있을 가능성이 큽니다.- 현재 서버는 SSL 인증서가 없으므로
http://로 맞춰야 합니다.
- Cloudflare SSL 모드
- Cloudflare 기본 설정에서 SSL 모드가 “Flexible” 또는 “Full”로 되어 있으면, Cloudflare가 HTTPS로 접속을 시도합니다.
- 홈서버가 HTTPS를 지원하지 않으면 523/404 오류가 발생합니다.
- 리디렉션 플러그인/서버 설정
- 일부 플러그인이나
.htaccess규칙이 HTTP 요청을 HTTPS로 강제 리디렉션할 수 있습니다.
- 일부 플러그인이나
✅ 해결 체크리스트
- 워드프레스 주소 수정
- 관리자 페이지 →
설정 → 일반에서- 워드프레스 주소(URL):
http://makerskorean.kr - 사이트 주소(URL):
http://makerskorean.kr
- 워드프레스 주소(URL):
- HTTPS가 아닌 HTTP로 저장하세요.
- 관리자 페이지 →
- Cloudflare SSL 모드 확인
- Cloudflare 대시보드 → SSL/TLS 메뉴에서
- SSL 모드를 Off 또는 Flexible로 설정해보세요.
- 홈서버에 SSL 인증서가 없다면 “Full”이나 “Full (Strict)”는 사용 불가입니다.
- Cloudflare 대시보드 → SSL/TLS 메뉴에서
- .htaccess 파일 확인
.htaccess에 HTTPS 강제 리디렉션 규칙이 있는지 확인하고 제거합니다. 예:RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]→ 이런 규칙이 있으면 삭제하세요.
- SSL 인증서 설치 고려
- 장기적으로는 홈서버에 무료 SSL 인증서(Let’s Encrypt)를 설치하는 것이 좋습니다.
- Cloudflare의 “Always Use HTTPS” 옵션을 켜려면 서버도 HTTPS를 지원해야 합니다.
⚡ 정리
- 지금은 워드프레스와 Cloudflare가 HTTPS를 강제하지만 서버는 HTTP만 지원하는 불일치 문제입니다.
- 당장은 워드프레스 주소를
http://로 맞추고 Cloudflare SSL 모드를 Flexible/Off로 바꾸면 해결됩니다. - 이후 SSL 인증서를 설치하면
https://로 안전하게 운영할 수 있습니다.
👉 원하시면 제가 홈서버에 무료 SSL 인증서(Let’s Encrypt) 설치 절차를 단계별로 정리해드릴 수 있습니다. 그러면 HTTPS로 안정적으로 운영할 수 있어요.
핵심 답변: DDNS 기반 홈서버를 Cloudflare 네임서버로 연결해 HTTPS(SSL) 적용하려면, Cloudflare SSL 모드 설정 + 홈서버 SSL 인증서 설치(예: Let’s Encrypt) + 포트포워딩/방화벽 허용을 단계별로 진행해야 합니다 devteam.co.kr knowledgemingle.tistory.com devpopcorn.com.
✅ Cloudflare + DDNS 홈서버 HTTPS 적용 가이드
1. Cloudflare DNS 설정
- 도메인을 Cloudflare에 추가하고 네임서버를 Cloudflare로 이전.
- DDNS 서비스가 갱신하는 공인 IP를 A 레코드에 등록.
- TTL을 짧게(예: 120초) 설정해 IP 변경 시 빠르게 반영되도록 조정.
- Proxy(구름 아이콘)를 켜면 Cloudflare SSL을 사용할 수 있음.
2. SSL 모드 선택
Cloudflare 대시보드 → SSL/TLS 메뉴에서 모드 설정:
| 모드 | 특징 | 홈서버 조건 |
|---|---|---|
| Flexible | 브라우저 ↔ Cloudflare 구간만 HTTPS, Cloudflare ↔ 서버는 HTTP | 서버에 SSL 없음 |
| Full | 브라우저 ↔ Cloudflare ↔ 서버 모두 HTTPS | 서버에 SSL 필요 |
| Full (Strict) | 서버 SSL 인증서가 유효해야 함 | Let’s Encrypt 등 설치 필수 |
👉 권장: 홈서버에 Let’s Encrypt 설치 후 Full (Strict) 모드 사용. Flexible은 보안상 취약.
3. 홈서버 SSL 인증서 설치
- Let’s Encrypt 무료 SSL 발급 (
certbot사용). - 예시 (Ubuntu + Nginx):
sudo apt install certbot python3-certbot-nginx sudo certbot --nginx -d makerskorean.kr -d www.makerskorean.kr - Apache라면
--apache옵션 사용. - 인증서 자동 갱신 크론잡 설정 (
certbot renew).
4. 포트포워딩 및 방화벽
- 공유기에서 80, 443 포트를 홈서버 내부 IP로 포워딩.
- 서버 방화벽(UFW, iptables 등)에서 80/443 허용.
- ISP가 포트를 막는 경우, 다른 포트 사용 후 Nginx 리버스 프록시로 매핑.
5. 워드프레스 설정
설정 → 일반에서 워드프레스 주소(URL), 사이트 주소(URL)를https://makerskorean.kr로 변경..htaccess또는 Nginx 설정에서 HTTP → HTTPS 리디렉션 추가:server { listen 80; server_name makerskorean.kr www.makerskorean.kr; return 301 https://$host$request_uri; }
6. Cloudflare 추가 보안 옵션
- Always Use HTTPS: 모든 요청을 HTTPS로 강제.
- HSTS: 브라우저가 항상 HTTPS로 접속하도록 설정.
- TLS 1.3 활성화: 최신 암호화 프로토콜 사용.
- 캐시 최적화: 서버 부하 감소.
⚠️ 주의사항
- Flexible 모드는 서버와 Cloudflare 간 통신이 암호화되지 않아 보안상 위험.
- SSL 인증서가 만료되면 접속 불가 → 자동 갱신 필수.
- DDNS 환경에서는 IP 변경 시 Cloudflare DNS가 즉시 갱신되는지 확인해야 안정적 운영 가능.
👉 다음 단계로, 제가 Let’s Encrypt 인증서 발급 및 자동 갱신 절차를 홈서버 환경(Ubuntu/Nginx 기준)으로 상세히 정리해드릴 수 있습니다. 원하시면 바로 이어서 설명해드릴게요.
좋습니다 👍. 앞서 말씀드린 Cloudflare + DDNS + SSL 적용 절차를 Apache2 웹서버 기준으로 다시 정리해드릴게요.
✅ Cloudflare + DDNS 홈서버 HTTPS 적용 (Apache2 기준)
1. Cloudflare DNS 설정
- 도메인을 Cloudflare에 추가하고 네임서버를 Cloudflare로 이전.
- DDNS 서비스가 갱신하는 공인 IP를 Cloudflare DNS의 A 레코드에 등록.
- TTL을 짧게(예: 120초) 설정해 IP 변경 시 빠르게 반영되도록 조정.
- Proxy(구름 아이콘)를 켜면 Cloudflare SSL을 사용할 수 있음.
2. Cloudflare SSL 모드 선택
Cloudflare 대시보드 → SSL/TLS 메뉴:
- Flexible: 브라우저 ↔ Cloudflare만 HTTPS, Cloudflare ↔ 서버는 HTTP (서버 SSL 불필요).
- Full: 브라우저 ↔ Cloudflare ↔ 서버 모두 HTTPS (서버 SSL 필요).
- Full (Strict): 서버 SSL 인증서가 유효해야 함 (Let’s Encrypt 등 설치 필수).
👉 권장: Apache2에 Let’s Encrypt 설치 후 Full (Strict) 모드 사용.
3. Apache2 SSL 인증서 설치 (Let’s Encrypt)
- Certbot 설치:
sudo apt update sudo apt install certbot python3-certbot-apache - 인증서 발급:
sudo certbot --apache -d makerskorean.kr -d www.makerskorean.kr - 자동 갱신 테스트:
sudo certbot renew --dry-run
4. Apache2 가상호스트 설정
/etc/apache2/sites-available/makerskorean.conf예시:
<VirtualHost *:80>
ServerName makerskorean.kr
ServerAlias www.makerskorean.kr
Redirect permanent / https://makerskorean.kr/
</VirtualHost>
<VirtualHost *:443>
ServerName makerskorean.kr
ServerAlias www.makerskorean.kr
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/makerskorean.kr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/makerskorean.kr/privkey.pem
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
- 설정 적용:
sudo a2enmod ssl rewrite sudo systemctl restart apache2
5. 포트포워딩 및 방화벽
- 공유기에서 80, 443 포트를 홈서버 내부 IP로 포워딩.
- 서버 방화벽(UFW 등)에서 80/443 허용:
sudo ufw allow 80 sudo ufw allow 443
6. 워드프레스 설정
설정 → 일반에서 워드프레스 주소(URL), 사이트 주소(URL)를https://makerskorean.kr로 변경..htaccess기본값 확인:# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
7. Cloudflare 추가 옵션
- Always Use HTTPS: 모든 요청을 HTTPS로 강제.
- HSTS: 브라우저가 항상 HTTPS로 접속하도록 설정.
- TLS 1.3 활성화: 최신 암호화 프로토콜 사용.
⚡ 정리
- Apache2 홈서버에 Let’s Encrypt SSL 인증서 설치 → Cloudflare SSL 모드 Full (Strict).
- 가상호스트 설정에서 HTTP → HTTPS 리디렉션 추가.
- 포트포워딩/방화벽 확인 후 워드프레스 주소를 HTTPS로 변경.
👉 원하시면 제가 Apache2에서 Certbot으로 SSL 인증서 자동 갱신을 안정적으로 설정하는 방법까지 이어서 정리해드릴 수 있습니다.
ub2020@100makerskorean:~$ sudo apt install certbot python3-certbot-apache
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
The following packages were automatically installed and are no longer required:
libffi7 libicu66
Use ‘sudo apt autoremove’ to remove them.
The following additional packages will be installed:
augeas-lenses libaugeas0 python3-acme python3-augeas python3-certbot python3-configargparse python3-configobj python3-icu python3-josepy python3-openssl python3-parsedatetime python3-rfc3339 python3-tz
Suggested packages:
augeas-doc python-certbot-doc python3-certbot-nginx augeas-tools python-acme-doc python-certbot-apache-doc python-configobj-doc python-openssl-doc python3-openssl-dbg
The following NEW packages will be installed:
augeas-lenses certbot libaugeas0 python3-acme python3-augeas python3-certbot python3-certbot-apache python3-configargparse python3-configobj python3-icu python3-josepy python3-openssl python3-parsedatetime python3-rfc3339
python3-tz
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,770 kB of archives.
After this operation, 9,129 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 augeas-lenses all 1.14.1-1build2 [323 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 libaugeas0 amd64 1.14.1-1build2 [166 kB]
Get:3 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-openssl all 23.2.0-1 [47.8 kB]
Get:4 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-josepy all 1.14.0-1 [22.1 kB]
Get:5 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-tz all 2024.1-2 [31.4 kB]
Get:6 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-rfc3339 all 1.1-4 [6,744 B]
Get:7 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-acme all 2.9.0-1 [48.5 kB]
Get:8 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-augeas all 0.5.0-1.1 [9,124 B]
Get:9 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-configargparse all 1.7-1 [31.7 kB]
Get:10 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-configobj all 5.0.8-3 [33.8 kB]
Get:11 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-parsedatetime all 2.6-3 [32.8 kB]
Get:12 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-certbot all 2.9.0-1 [267 kB]
Get:13 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 certbot all 2.9.0-1 [89.2 kB]
Get:14 http://kr.archive.ubuntu.com/ubuntu noble/universe amd64 python3-certbot-apache all 2.9.0-1 [128 kB]
Get:15 http://kr.archive.ubuntu.com/ubuntu noble/main amd64 python3-icu amd64 2.12-1build2 [534 kB]
Fetched 1,770 kB in 0s (9,810 kB/s)
Preconfiguring packages …
Selecting previously unselected package augeas-lenses.
(Reading database … 326825 files and directories currently installed.)
Preparing to unpack …/00-augeas-lenses_1.14.1-1build2_all.deb …
Unpacking augeas-lenses (1.14.1-1build2) …
Selecting previously unselected package libaugeas0:amd64.
Preparing to unpack …/01-libaugeas0_1.14.1-1build2_amd64.deb …
Unpacking libaugeas0:amd64 (1.14.1-1build2) …
Selecting previously unselected package python3-openssl.
Preparing to unpack …/02-python3-openssl_23.2.0-1_all.deb …
Unpacking python3-openssl (23.2.0-1) …
Selecting previously unselected package python3-josepy.
Preparing to unpack …/03-python3-josepy_1.14.0-1_all.deb …
Unpacking python3-josepy (1.14.0-1) …
Selecting previously unselected package python3-tz.
Preparing to unpack …/04-python3-tz_2024.1-2_all.deb …
Unpacking python3-tz (2024.1-2) …
Selecting previously unselected package python3-rfc3339.
Preparing to unpack …/05-python3-rfc3339_1.1-4_all.deb …
Unpacking python3-rfc3339 (1.1-4) …
Selecting previously unselected package python3-acme.
Preparing to unpack …/06-python3-acme_2.9.0-1_all.deb …
Unpacking python3-acme (2.9.0-1) …
Selecting previously unselected package python3-augeas.
Preparing to unpack …/07-python3-augeas_0.5.0-1.1_all.deb …
Unpacking python3-augeas (0.5.0-1.1) …
Selecting previously unselected package python3-configargparse.
Preparing to unpack …/08-python3-configargparse_1.7-1_all.deb …
Unpacking python3-configargparse (1.7-1) …
Selecting previously unselected package python3-configobj.
Preparing to unpack …/09-python3-configobj_5.0.8-3_all.deb …
Unpacking python3-configobj (5.0.8-3) …
Selecting previously unselected package python3-parsedatetime.
Preparing to unpack …/10-python3-parsedatetime_2.6-3_all.deb …
Unpacking python3-parsedatetime (2.6-3) …
Selecting previously unselected package python3-certbot.
Preparing to unpack …/11-python3-certbot_2.9.0-1_all.deb …
Unpacking python3-certbot (2.9.0-1) …
Selecting previously unselected package certbot.
Preparing to unpack …/12-certbot_2.9.0-1_all.deb …
Unpacking certbot (2.9.0-1) …
Selecting previously unselected package python3-certbot-apache.
Preparing to unpack …/13-python3-certbot-apache_2.9.0-1_all.deb …
Unpacking python3-certbot-apache (2.9.0-1) …
Selecting previously unselected package python3-icu.
Preparing to unpack …/14-python3-icu_2.12-1build2_amd64.deb …
Unpacking python3-icu (2.12-1build2) …
Setting up python3-configargparse (1.7-1) …
Setting up python3-parsedatetime (2.6-3) …
Setting up python3-icu (2.12-1build2) …
Setting up augeas-lenses (1.14.1-1build2) …
Setting up python3-openssl (23.2.0-1) …
Setting up python3-tz (2024.1-2) …
Setting up python3-configobj (5.0.8-3) …
Setting up libaugeas0:amd64 (1.14.1-1build2) …
Setting up python3-josepy (1.14.0-1) …
Setting up python3-augeas (0.5.0-1.1) …
Setting up python3-rfc3339 (1.1-4) …
Setting up python3-acme (2.9.0-1) …
Setting up python3-certbot (2.9.0-1) …
Setting up certbot (2.9.0-1) …
Installing new version of config file /etc/cron.d/certbot …
Installing new version of config file /etc/letsencrypt/cli.ini …
Setting up python3-certbot-apache (2.9.0-1) …
Processing triggers for man-db (2.12.0-4build2) …
Processing triggers for libc-bin (2.39-0ubuntu8.6) …
ub2020@100makerskorean:~$ sudo certbot –apache -d makerskorean.kr -d www.makerskorean.kr
Saving debug log to /var/log/letsencrypt/letsencrypt.log
An RSA certificate named makerskorean.kr-0001 already exists. Do you want to
update its key type to ECDSA?
(U)pdate key type/(K)eep existing key type: U
You have an existing certificate that contains a portion of the domains you
requested (ref: /etc/letsencrypt/renewal/makerskorean.kr-0001.conf)
It contains these names: makerskorean.kr
You requested these names for the new certificate: makerskorean.kr,
www.makerskorean.kr.
Do you want to expand and replace this existing certificate with the new
certificate?
(E)xpand/(C)ancel: E
Renewing an existing certificate for makerskorean.kr and www.makerskorean.kr
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/makerskorean.kr-0001/fullchain.pem
Key is saved at: /etc/letsencrypt/live/makerskorean.kr-0001/privkey.pem
This certificate expires on 2026-04-11.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for makerskorean.kr to /etc/apache2/sites-available/webmin.1768121154-le-ssl.conf
We were unable to find a vhost with a ServerName or Address of www.makerskorean.kr.
Which virtual host would you like to choose?
1: webmin.1768121154.conf | | | Enabled
2: webmin.1768121154-le-ssl.conf | makerskorean.kr | HTTPS | Enabled
Select the appropriate number [1-2] then [enter] (press ‘c’ to cancel): 2
Successfully deployed certificate for www.makerskorean.kr to /etc/apache2/sites-available/webmin.1768121154-le-ssl.conf
Your existing certificate has been successfully renewed, and the new certificate has been installed.
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-le
ub2020@100makerskorean:~$ sudo certbot renew –dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/makerskorean.kr-0001.conf
Simulating renewal of an existing certificate for makerskorean.kr and www.makerskorean.kr
Congratulations, all simulated renewals succeeded:
/etc/letsencrypt/live/makerskorean.kr-0001/fullchain.pem (success)
ub2020@100makerskorean:~$ sudo certbot renew –dry-run
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/makerskorean.kr-0001.conf
Simulating renewal of an existing certificate for makerskorean.kr and www.makerskorean.kr
Congratulations, all simulated renewals succeeded:
/etc/letsencrypt/live/makerskorean.kr-0001/fullchain.pem (success)
ub2020@100makerskorean:~$ sudo nano /etc/apache2/sites-available/makerskorean.conf
ub2020@100makerskorean:~$ sudo a2enmod ssl rewrite
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled
Module rewrite already enabled
ub2020@100makerskorean:~$ sudo systemctl restart apache2
ub2020@100makerskorean:~$ sudo ufw allow 80
Rules updated
Rules updated (v6)
ub2020@100makerskorean:~$
ub2020@100makerskorean:~$
ub2020@100makerskorean:~$
ub2020@100makerskorean:~$ sudo ufw allow 443
Rules updated
Rules updated (v6)
ub2020@100makerskorean:~$
