HTTP 버전 별 차이점을 비교해보는 레포지토리
- git clone https://github.com/HTTP-LAB/HTTP-Version-Test.git
- cd docker
- SSL 인증서 설치
- Docker-Compose 파일에 명시된 경로로 인증서 파일 이동
- Docker 설치
- Docker-Compose 설치
sudo docker-compose -f docker-compose.yml up --buld -d실행
- 기본 페이지 : https://www.httplab.shop:10443/default-template/index.html
- 최적회된 페이지 : https://www.httplab.shop:10443/optimization-http1/index.html
- 기본 페이지 : https://www.httplab.shop:20443/default-template/index.html
- 최적화된 페이지 : https://www.httplab.shop:20443/optimization-http2/index.html
- 기본 페이지 : https://www.httplab.shop:30443/default-template/index.html
- 최적화된 페이지 : https://www.httplab.shop:30443/optimization-http2/index.html
- Docker
- Docker-Compose
- Nginx
- macbre/nginx-http3
- http3 가 적용된 nginx 도커 이미지
- https://hub.docker.com/r/macbre/nginx-http3
server {
server_name www.httplab.shop;
# http/3
listen 443 quic reuseport;
# http/2 또는 http/1.1
listen 443 ssl;
http2 on;
ssl_certificate /etc/nginx/certs/fullchain.pem;
ssl_certificate_key /etc/nginx/certs/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
# 0-RTT QUIC
ssl_early_data on;
# HTTP/3.0 정보 (30443 포트로 h3 사용가능)
add_header alt-svc 'h3=":30443"; ma=86400';
# QUIC이 사용될 때 추가되는 헤더
add_header QUIC-Status $http3;
root /var/www/html;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}