Nginx 1.13.7 업데이트기
HTTP/2 통신도 적용할 겸 신 버전과 openssl 1.0.2 를 적용하고자
업데이트를 하려고 한다.
HTTP/2에 대한 정보는 아래를 참고하자
http://www.popit.kr/%EB%82%98%EB%A7%8C-%EB%AA%A8%EB%A5%B4%EA%B3%A0-%EC%9E%88%EB%8D%98-http2/
위 사진만 봐도 충분히 http/2 프로토콜로 통신할 필요를 느낀다.
nginx컴파일 시 주던 arguments
/*
Nginx -V하면 나오는 값은 아래와 같다.
–prefix=/usr/local/nginx –conf-path=/usr/local/nginx/conf/nginx.conf –error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log –with-http_ssl_module –with-http_stub_status_module –with-pcre=/root/http/pcre-8.41 –user=ngnix
*/
여기에
–with-http_ssl_module –with-http_realip_module –with-http_addition_module –with-http_sub_module –with-http_dav_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-http_auth_request_module –with-threads –with-stream –with-stream_ssl_module –with-stream_realip_module
를 추가로 붙인다.
pcre는 8.39에서 8.41로 업데이트했다.
–with-pcre=/root/http/pcre-8.41 를 추가.
openssl도 별도로 1.0.2버전을 사용해야 한다. (이 모듈은 일정 버전 이상의 openssl을 필요로한다)
–with-openssl=/root/security/openssl-1.0.2m
./configure –prefix=/usr/local/nginx –conf-path=/usr/local/nginx/conf/nginx.conf \
–error-log-path=/var/log/nginx/error.log –http-log-path=/var/log/nginx/access.log \
–with-http_ssl_module –with-openssl=/root/security/openssl-1.0.2m –with-http_stub_status_module \
–with-pcre=/root/http/pcre-8.41 –user=ngnix \
–with-http_ssl_module –with-http_realip_module –with-http_addition_module \
–with-http_sub_module –with-http_dav_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-http_auth_request_module \
–with-threads –with-stream –with-stream_ssl_module –with-stream_realip_module \
–with-http_v2_module
이것저것 잘 지정해줬다면 아래와같이 summary 가 나타날 것이다.
이제 make -j {n} && make -j {n} install 로 컴파일 및 설치를 해주자
정상적으로 업데이트가 되었다면 바로 nginx -V를 했을 시
업데이트된 1.13.7버전과 openssl모듈, 그리고 맨 마지막에 나와있는
–with-http_v2_module 파라미터까지 완벽하게 설치되어있다.
만약 최초로 설치한다면 이전 글을 참고하여 바이너리 파일 링킹 및 init 데몬을 만들어주자.
자 그러면 이제 제대로 http/2 통신이 적용되는지 확인해보자
https://cdnsun.com/knowledgebase/tools/http2-support-test
본인의 도메인 URL을 넣고 테스트한다면
YES가 나와야 정상이다
다른 방법으로는 크롬 등의 브라우저에서 개발자 도구( F12)에 들어가
Network 패킷 캡쳐를 해주는 툴을 사용하자
위처럼 http2 프로토콜을 사용하여 통신하여야한다.
1개의 댓글