일단 먼저 아래 명령어로 nginx 서버와 필요한 패치 파일들을 다운로드 합니다. 대부분의 리눅스 배포판에서 제공되는 OpenSSL의 버전이 1.0.x인 관계로, 저희는 OpenSSL 1.1.1을 별도로 다운로드 받아 이용하도록 합니다.

 

* 글을 작성하는 시점에서 nginx의 최신 버전은 1.17.6입니다.

 

wget http://nginx.org/download/nginx-1.17.6.tar.gz

tar xvf nginx-1.17.6.tar.gz && cd nginx-1.17.6

wget -O - https://s2.commania.co.kr/nginx/nginx-openssl-1.1.1.patch | patch -p1

wget -O - https://s2.commania.co.kr/nginx/ssl-chacha-priority.patch | patch -p1 -d openssl-1.1.1d/

wget -O - https://s2.commania.co.kr/nginx/ssl-tls13.patch | patch -p1 -d openssl-1.1.1d/

 

패치가 모두 적용되었으면 아래 명령어로 nginx 서버를 컴파일 합니다. (볼드체 한 부분이 중요합니다.)

 

./configure --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --with-http_sub_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-file-aio --without-http_memcached_module --without-http_upstream_hash_module --without-http_upstream_ip_hash_module --without-http_upstream_least_conn_module --without-http_upstream_keepalive_module --without-http_ssi_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_v2_module ​--with-openssl=./openssl-1.1.1d --with-openssl-opt='-DOPENSSL_NO_HEARTBEATS enable-ec_nistp_64_gcc_128 enable-weak-ssl-ciphers'

make -j4

sudo make install

 

이제 nginx의 설치가 끝났습니다. HTTP/2 및 TLS1.3 적용을 원하는 host의 conf 파일에서, 아래와 같이 설정을 추가합니다. 볼드체 한 부분이 중요합니다.

 

server {
        listen       111.111.111.111:443 ssl http2;

        

        ssl_certificate /etc/nginx/인증서위치.crt;
        ssl_certificate_key /etc/nginx/개인키위치.key;

        ssl_protocols  TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
        ssl_prefer_server_ciphers on;
        ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:kEDH+AESGCM:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES128-SHA256:AES128-SHA:SRP-RSA-AES-128-CBC-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA:!DHE-RSA-AES256-GCM-SHA384:!DHE-RSA-AES128-GCM-SHA256;

파일을 모두 수정하고 nginx를 reload 하시면 HTTP/2 및 TLS1.3 적용이 완료됩니다. 테스트는 SSLLabs에서 가능합니다.

 

* 본 사이트는 HTTP/2 및 TLS1.3을 모두 사용중입니다.

1.png

 

 

2.png

 

 

 


번호 제목 글쓴이 조회 날짜
» nginx에서 HTTP/2, TLS 1.3 적용하기 file 컴퓨터매니아 1846 2019.12.07
20 V43 Qtopia 펌웨어 인증받기 컴퓨터매니아 874 2017.12.24
19 SSLLabs SSL 테스트에서 A 받기 file 컴퓨터매니아 870 2016.04.30
18 Fedora 폰트 렌더링 개선하기 컴퓨터매니아 2400 2015.05.05
17 리포PE USB에 설치하기 9 file 컴퓨터매니아 4054 2014.10.04
16 리포PE에서 데스크탑 세션 바꾸기 3 컴퓨터매니아 2063 2014.10.03
15 리눅스에서 exFAT 파일시스템 읽고 쓰기 2 컴퓨터매니아 3728 2014.09.10
14 리눅스에서 파일 보안 삭제하기 컴퓨터매니아 2121 2014.08.30
13 useradd 사용법 컴퓨터매니아 5648 2014.05.22
12 Apache 2.4 컴파일 설치하기 4 컴퓨터매니아 10451 2014.03.31
11 특정 프로그램의 사용법을 오프라인으로 확인하기 1 컴퓨터매니아 2773 2014.02.22
10 윈도우와 리눅스의 수퍼유저 4 컴퓨터매니아 4973 2014.01.29
9 김프(GIMP)로 화면 캡쳐하기 1 file 컴퓨터매니아 3353 2013.11.17
8 CentOS root 패스워드 복구 4 file 컴퓨터매니아 5510 2013.11.15
7 xterm 세션에서 GNOME으로 전환하기 4 file 컴퓨터매니아 2619 2013.11.10
6 리눅스에서 프로세스 종료하기 2 컴퓨터매니아 8456 2013.11.05
5 리눅스의 init과 RunLevel 3 컴퓨터매니아 7945 2013.11.04
4 [Apache 웹서버] 3. MySQL, XE 설치하기 5 file 컴퓨터매니아 9321 2013.11.03
3 NMI Watchdog 에러 해결하기 1 file 컴퓨터매니아 3938 2013.10.27
2 [Apache 웹서버] 2. Apache, PHP 설치하기 12 file 컴퓨터매니아 8638 2013.10.21

 빠른 글쓰기




   Copyright 2013-2023 LinuxForum