You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.24 버전에서 http2 on 설정을 추가하면 다음처럼 Nginx 가 시작되지 않는 장애가 생깁니다.
[root@php79 ~]# nginx -v
nginx version: nginx/1.24.0
[root@php79 ~]# nginx -t
nginx: [warn] protocol options redefined for 0.0.0.0:443 in /etc/nginx/conf.d/php79.conf:74
nginx: [emerg] unknown directive "http2" in /etc/nginx/conf.d/php79.conf:75
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@php79 ~]# systemctl restart nginx
Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.
stack 개선
stack 1.5.0 에서 기본 템플릿을 nginx 1.25.1 용으로 분기 예정. letsencrypt/template-server.conf
참고) 1.25.1 변경 로그
hanges with nginx 1.25.1 13 Jun 2023
*) Feature: the "http2" directive, which enables HTTP/2 on a per-server
basis; the "http2" parameter of the "listen" directive is now
deprecated.
ibin79
changed the title
nginx: [warn] the "listen ... http2" directive is deprecated
Nginx 경고 대응 - the "listen ... http2" directive is deprecated
Nov 17, 2024
이미 추가된 사이트의 nginx conf 파일은 수정하지 않음. 이슈 본문에서 직접 수정 가이드만 안내.
신규 추가시에만 nginx 버전 확인하여 SSL 인증서 설치시 설정 분기
2개 버전용 설정중 미사용 설정은 주석 처리하여 일단 포함해둠. 추후 버전 변경시 주석 치환만으로 쉽게 변경 가능하도록 함.
Nginx 1.25.1 이상 - letsencrypt/template-server-1.25.1.conf * 신규 추가
#listen 443 ssl http2; # nginx 1.25.1 이전 버전 (1.24.0 등)
listen 443 ssl; # nginx 1.25.1 이상 버전
http2 on; # nginx 1.25.1 이상 버전 https://github.com/php79/stack/issues/110
Nginx 1.25.1 이전 - letsencrypt/template-server.conf
listen 443 ssl http2; # nginx 1.25.1 이전 버전 (1.24.0 등)
#listen 443 ssl; # nginx 1.25.1 이상 버전
#http2 on; # nginx 1.25.1 이상 버전 https://github.com/php79/stack/issues/110
Nginx 1.25.1 이후, http2 설정 경고 -
the "listen ... http2" directive is deprecated
1.25.1 이후 해결 방법
이미 추가된 사이트는 nginx 사이트.conf 에서 http2 구문만 수정하면 됩니다.
http2 on
추가주의) 1.24 등 이전 버전에서
http2 on
미지원1.24 버전에서
http2 on
설정을 추가하면 다음처럼 Nginx 가 시작되지 않는 장애가 생깁니다.stack 개선
참고) 1.25.1 변경 로그
The text was updated successfully, but these errors were encountered: