roots / trellis

WordPress LEMP stack with PHP 8.2, Composer, WP-CLI and more
https://roots.io/trellis/
MIT License
2.51k stars 607 forks source link

[upd] wordpress-site.conf.j2 fix deprecated directive nginx ^1.25.1 #1512

Open arisonadim opened 9 months ago

arisonadim commented 9 months ago

Fix for nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead

swalkinshaw commented 9 months ago

I'm not sure this should be merged yet since it's just a deprecation warning. It could cause problems if people re-provision servers but don't upgrade Nginx.

1.25.1 was released in June

arisonadim commented 9 months ago

Thanks for the response, I've faced problem when provision fresh trellis install. Despite the fact that this is just a warning, provision process has been halted.

Ubuntu 22.04.4 LTS (Jammy Jellyfish)

swalkinshaw commented 9 months ago

Despite the fact that this is just a warning, provision process has been halted.

Can you post the logs of where this happens? I just tried a brand new provision and it runs successfully without seeing any warnings. I only see them if I run nginx -t:

nginx -t
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/example.com.conf:5
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/example.com.conf:6
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/example.com.conf:127
nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/sites-enabled/example.com.conf:128