Correggere l'errore the listen ... http2 directive is deprecated, use the http2 directive instead in nginx proxy manager

From RVM Wiki
Revision as of 11:52, 12 January 2026 by Gabriele.vivinetto (talk | contribs) (Created page with "Se all'avvio si vede nei log: nginx-app  | nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /data/nginx/proxy_host/12.conf:19 eseguire:<pre> docker compose exec nginx.crodocker01.croalliance.priv-app \ /bin/bash -c " cd /data/nginx/proxy_host && sed -i 's/listen 443 ssl http2;/listen 443 ssl;\nhttp2 on;/g' *.conf && sed -i '/^listen \[::\]:443 ssl http2;/s/ http2//' *.conf " \ | tee -a update.log </pre>In prat...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Se all'avvio si vede nei log:

nginx-app  | nginx: [warn] the "listen ... http2" directive is deprecated, use the "http2" directive instead in /data/nginx/proxy_host/12.conf:19

eseguire:

docker compose exec nginx.crodocker01.croalliance.priv-app \
  /bin/bash -c "
  cd /data/nginx/proxy_host &&
  sed -i 's/listen 443 ssl http2;/listen 443 ssl;\nhttp2 on;/g' *.conf &&
  sed -i '/^listen \[::\]:443 ssl http2;/s/ http2//' *.conf " \
  | tee -a update.log

In pratica cambia:

listen 80; listen [::]:80;

listen 443 ssl http2; listen [::]:443 ssl http2;

in:

listen 80; listen [::]:80;

listen 443 ssl; http2 on; listen [::]:443 ssl;

Riferimenti