evertramos / nginx-proxy-automation

Automated docker nginx proxy integrated with letsencrypt.
MIT License
2.66k stars 632 forks source link

[BUG] proxy-web-auto, unknown directive "http2" #381

Closed Tampacz closed 1 year ago

Tampacz commented 1 year ago

Describe the bug [emerg] 1#1: unknown directive "http2" in /etc/nginx/conf.d/default.conf:82

To Reproduce Steps to reproduce the behavior:

  1. cd /root/proxy
  2. docker-compose up

Server info (please complete the following information):

Logs (please send some logs): proxy-web-auto | 10-listen-on-ipv6-by-default.sh: info: /etc/nginx/conf.d/default.conf differs from the packaged version proxy-web-auto | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh proxy-web-auto | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh proxy-web-auto | /docker-entrypoint.sh: Configuration complete; ready for start up proxy-web-auto | 2023/07/18 15:17:52 [emerg] 1#1: unknown directive "http2" in /etc/nginx/conf.d/default.conf:82 proxy-web-auto | nginx: [emerg] unknown directive "http2" in /etc/nginx/conf.d/default.conf:82

masda70 commented 1 year ago

Related : https://github.com/nginx-proxy/nginx-proxy/issues/2277

Quick fix, use latest nginx (1.25) instead of 1.24 (stable)

in the .env file

DEFAULT_NGINX_PROXY_IMAGE_VERSION="mainline-alpine"