Posts

Showing posts from December, 2023

Nginx HTTP2 directive old vs new test result

 The nginx "http2" directive appended after "listen" is deprecated since 1.25.1. Let's see if Nginx will start under old and new version if we put this directive incorrectly Nginx after v1.25.1 server {     listen 80 http2;  # Work, but will issue deprecated warning during start     http2 on; ... } Nginx before v1.25.1 server {     listen 80 http2;       http2 on; # Not work, issue error: unknown directive http2 ... } Conclusion: - Appending http2 in Nginx latest version is OK, even if the the correct directive is `http2 on;` - Do not use standalone `http2 on;` on unsupported Nginx version, it will fail to start. Hope it helps someone.