Articles in this section

nginx shows warning when using custom templates: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead

Plesk for Linux kb: technical

Symptoms

  • The following error when testing the NGINX configurations for syntax errors:

    # nginx -t
    nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /etc/nginx/plesk.conf.d/vhosts/example.com.conf:7

  • Custom templates are in use

Cause

The custom templates refer to the deprecated directives.

Resolution

  1. Connect to the server via SSH
  2. Remove or correct the custom templates under /usr/local/psa/admin/conf/templates/custom/domain/
  3. Disable the http2_pref:

    # plesk bin http2_pref --disable

  4. Re-enable it:

    # plesk bin http2_pref --enable

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.