ha-3dprinter-addons/3dprinter-octoprint/rootfs/etc/nginx/nginx.conf
2022-09-27 10:59:35 +02:00

52 lines
1.3 KiB
Nginx Configuration File

# Run nginx in foreground.
daemon off;
# This is run inside Docker.
user root;
# Pid storage location.
pid /var/run/nginx.pid;
# Set number of worker processes.
worker_processes 1;
# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;
# Write error log to the add-on log.
# error_log /proc/1/fd/1 error;
error_log /var/log/nginx/error.log debug;
# Max num of simultaneous connections by a worker process.
events {
worker_connections 512;
}
http {
include /etc/nginx/includes/mime.types;
access_log off;
client_max_body_size 0;
default_type application/octet-stream;
gzip on;
keepalive_timeout 65;
sendfile on;
server_tokens off;
tcp_nodelay on;
tcp_nopush on;
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
# Should get port used, taken from https://stackoverflow.com/questions/60616564/how-to-configure-nginx-x-forwarded-port-to-be-the-originally-request-port
map $http_x_forwarded_port $port {
default $remote_port;
"~^(.*)$" $1;
}
include /etc/nginx/includes/upstream.conf;
include /etc/nginx/servers/*.conf;
}