refactor: Update Nginx configuration to enable HTTP/2

This commit updates the Nginx configuration file to enable HTTP/2 by removing the `http2` directive from the `listen` directive and adding a separate `http2` directive. This change ensures that the server supports the latest HTTP/2 protocol, improving performance and security.
This commit is contained in:
Simon Larsen 2024-06-24 19:56:45 +01:00
parent ad48aae0ba
commit 70a9944f6a
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA
3 changed files with 9 additions and 4 deletions

View File

@ -43,7 +43,8 @@ server {
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
listen 7849 http2;
listen 7849;
http2 on;
server_name oneuptime-opentelemetry-collector ${OTEL_COLLECTOR_HOST};
@ -85,7 +86,8 @@ server {
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
listen 7849 http2;
listen 7849;
http2 on;
server_name oneuptime-fluentd-collector ${FLUENTD_HOST};
@ -353,9 +355,10 @@ server {
gzip_proxied no-cache no-store private expired auth;
gzip_min_length 1000;
listen 7849 http2;
listen 7849;
http2 on;
server_name localhost ingress ${HOST}; #All domains
server_name localhost ingress ${HOST}:${ONEUPTIME_HTTP_PORT}; #All domains
proxy_busy_buffers_size 512k;
proxy_buffers 4 512k;

View File

@ -31,6 +31,7 @@ INTERNAL_SMTP_PASSWORD=please-change-this-to-random-value
# If you are connecting Status Pages to custom domains, then this will be the port where the status page will be hosted on.
# This should be https port because oneuptime automatically generates ssl certs from lets encrypt.
STATUS_PAGE_HTTPS_PORT=443

View File

@ -383,6 +383,7 @@ services:
- oneuptime
environment:
<<: *common-server-variables
ONEUPTIME_HTTP_PORT: ${ONEUPTIME_HTTP_PORT}
ports:
- '${ONEUPTIME_HTTP_PORT}:7849'
- '${STATUS_PAGE_HTTPS_PORT}:7850'