sudo apt update
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d yourdomain.com
/etc/nginx/sites-available/yourdomain.com 파일 수정:
server {
# HTTP/3 (QUIC) - UDP 443
listen 443 quic reuseport;
# HTTP/2 및 HTTP/1.1 - TCP 443
listen 443 ssl http2;
# IPv6 지원
listen [::]:443 quic reuseport;
listen [::]:443 ssl http2;
server_name yourdomain.com;
# Let's Encrypt 인증서
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
# 최신 보안 프로토콜 설정 (하위 호환성 유지)
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
ssl_ciphers 'TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256';
# HTTP/3 지원 알림 (Alt-Svc 헤더)
add_header Alt-Svc 'h3=":443"; ma=86400, h3-29=":443"; ma=86400';
# HTTP Strict Transport Security
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains; preload";
# 기타 웹사이트 설정
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}
# HTTP → HTTPS 자동 리다이렉트 (모든 버전 호환)
server {
listen 80;
listen [::]:80;
server_name yourdomain.com;
return 301 https://$host$request_uri;
}
sudo nginx -T | grep -E 'http_v3_module|http_ssl_module|http_v2_module'
sudo ufw allow 443/tcp
sudo ufw allow 443/udp
sudo ufw reload
sudo systemctl restart nginx
크롬 브라우저:
chrome://net-internals/#quic 접속 → 활성화 확인curl 테스트:
# HTTP/1.1 테스트
curl -I --http1.1 https://yourdomain.com
# HTTP/2 테스트
curl -I --http2 https://yourdomain.com
# HTTP/3 테스트 (curl 7.66.0+ 필요)
curl -I --http3 https://yourdomain.com
온라인 검사 도구:
QUIC가 작동하지 않는 경우:
reuseport 옵션 확인구형 브라우저 지원:
인증서 갱신:
# 갱신 테스트
sudo certbot renew --dry-run
# 실제 갱신
sudo certbot renew
sudo systemctl reload nginx
이 설정은 다음과 같은 호환성을 보장합니다: