mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2026-04-25 08:45:58 +03:00
[PR #1397] Fix: Move http2 directive inside listen to resolve “unknown directive http2” error #5706
Labels
No labels
Q/A
bug
casdoor
dependencies
docker
documentation
duplicate
enhancement
help wanted
invalid
lego
platform:openwrt
platform:windows
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/nginx-ui#5706
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/0xJacky/nginx-ui/pull/1397
State: closed
Merged: No
Summary
This PR updates the NGINX configuration to correctly enable HTTP/2 by moving the http2 directive inside the listen statement.
Previously, using http2 as a standalone directive caused:
Problem
The original configuration:
Using http2 as a separate directive is not supported by NGINX.
This breaks the reverse proxy setup, especially for services that require WebSocket or HTTP/2.
Solution
The http2 directive is now placed correctly inside the listen statement:
This ensures proper HTTP/2 support and removes the startup error.