When installing a new Ghost instance on Ubuntu 24.04 with Nginx version 1.28.0, the following warnings are thrown when running sudo nginx -t to check the NGINX configuration for syntax errors and validity.
the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/mywebsite.com-ssl.conf:7
the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/mywebsite.com-ssl.conf::8
This is due to the listen … http2 directive being deprecated in NGINX 1.25.1 per this blog article.
What did you expect to happen?
For the install script to not use deprecated syntax when doing the automatic SSL setup and configuration.
Steps to Reproduce
Install Ghost on Ubuntu 24.04 with Nginx version 1.28.0 and then run sudo nginx -t after the installation is complete.
Setup information
Ghost Version
Ghost-CLI version: 1.28.0
Ghost version: 5.130.2
Provide details of your host & operating system
Oracle Cloud / Ubuntu 24.04.2 LTS / nginx 1.28.0
Database type
MySQL 8
Browser & OS version
N/A
Relevant log / error output the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/mywebsite.com-ssl.conf:7
the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/mywebsite.com-ssl.conf::8
Sorry, this should probably be moved to Developer Help > Self-Hosting.
The official installation guide only lists Ubuntu 20.04 or 22.04, neither of which include an Nginx version where the above syntax is deprecated. 24.04 doesn’t either, I just updated Nginx myself.
Yeah this one’s tricky. I’d be happy to update the CLI with the new http2 directive, but it looks like that individual http2 directive was added at the same time as the listen … http2; directive was deprecated. We’ll probably have to wait until nginx 1.25.1 is a bit more widely available before updating
No worries, I realized this shouldn’t be in bug reports after I posted.
I updated NGINX on my server to the latest 1.28 which is why I was seeing the deprecated syntax warning.
Ubuntu 24.04 doesn’t even come with NGINX 1.25.1 packaged where the syntax was deprecated (it’s still using 1.24.0), so I doubt many will see this deprecated warning anytime soon.