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

Enable HTTP/3 in NGINX #72

Merged
merged 2 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docker/config/sites/www.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,14 @@ server {
}

server {
# HTTP/3
listen 443 quic reuseport;
listen [::]:443 quic reuseport;

# HTTP/2 and HTTP/1.1
listen 443 ssl;
listen [::]:443 ssl;
http2 on;

server_name _;

Expand Down
6 changes: 5 additions & 1 deletion docker/config/ssl.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDS
ssl_prefer_server_ciphers off;

ssl_stapling on;
ssl_stapling_verify on;
ssl_stapling_verify on;

ssl_early_data on;

add_header alt-svc 'h3=":443"; ma=86400';
4 changes: 1 addition & 3 deletions docker/nginx.dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
FROM nginx:alpine

RUN curl https://ssl-config.mozilla.org/ffdhe2048.txt > /etc/ssl/dhparam.pem
FROM macbre/nginx-http3:latest
3 changes: 3 additions & 0 deletions docker/www.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,7 @@ RUN apk add git
RUN npm install
RUN npm run build

HEALTHCHECK --interval=5m --timeout=3s \
CMD curl -f http://localhost/ || exit 1

ENTRYPOINT ["node", ".scalar/main.js"]