Nginx: [warn] protocol options redefined

If you get an error message “nginx: [warn] protocol options redefined” after upgrading Nginx to the latest stable version 1.24, you can easily fix it by adding “http2” to the 443 “Listen” directive in the default.conf file.

vi /etc/nginx/conf.d/default.conf
server {
    listen   80 default_server;
    listen [::]:80 default_server;
    listen 443 default_server http2 ssl;
    listen [::]:443 default_server http2 ssl;

    ssl_reject_handshake on;

    server_name _;

    return 444;
}

Similar Posts