Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http2 on; doesnt work as expected #1339

Closed
skullcrushercmd opened this issue Jun 24, 2024 · 2 comments
Closed

http2 on; doesnt work as expected #1339

skullcrushercmd opened this issue Jun 24, 2024 · 2 comments

Comments

@skullcrushercmd
Copy link

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
Copy link
Author

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

@ac000
Copy link
Member

ac000 commented Jun 24, 2024

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!

@ac000 ac000 closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants