nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 322 forks source link

http2 on; doesnt work as expected #1339

Closed skullcrushercmd closed 1 week ago

skullcrushercmd commented 1 week ago

spent a while figuring out how to enable http3 with http2 and below with and without ssl encryption (http and https), when i use listen 80 http2; it works fine (on http but i didnt set it up for ssl so expected) but http2 on; doesnt work at all, below is one of my working configs without the extra ssl encryption

server { listen 443 quic reuseport; listen [::]:443 ssl; listen 443 ssl; listen 80 http2; ssl_early_data on; server_name gpt.anyvm.tech;

location / { proxy_pass http://localhost:3001; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; add_header alt-svc 'h3=":$server_port"; ma=1800'; add_header x-quic 'h3'; proxy_cache_bypass $http_upgrade; }

ssl_certificate /etc/letsencrypt/live/gpt.anyvm.tech/fullchain.pem; # managed by Certb> ssl_certificate_key /etc/letsencrypt/live/gpt.anyvm.tech/privkey.pem; # managed by Cer> }

server { if ($host = gpt.anyvm.tech) { return 301 https://$host$request_uri; } listen 80; listen [::]:80; server_name gpt.anyvm.tech;

}

skullcrushercmd commented 1 week ago

mainline nginx debian from https://nginx.org/en/linux_packages.html#Debian

ac000 commented 1 week ago

Hi, you have reached the bug tracker for NGINX Unit (not nginx the web server)... You should perhaps try asking on the nginx mailing list instead... thanks!