58 lines
1.4 KiB
Nginx Configuration File
58 lines
1.4 KiB
Nginx Configuration File
user nginx;
|
|
|
|
# Set number of worker processes automatically based on number of CPU cores.
|
|
worker_processes auto;
|
|
|
|
# Load Modules
|
|
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
|
|
load_module /usr/lib/nginx/modules/ngx_http_headers_more_filter_module.so;
|
|
|
|
|
|
# Enables the use of JIT for regular expressions to speed-up their processing.
|
|
pcre_jit on;
|
|
|
|
events {
|
|
# The maximum number of simultaneous connections that can be opened by
|
|
# a worker process.
|
|
worker_connections 1024;
|
|
}
|
|
|
|
http {
|
|
|
|
more_clear_headers Server;
|
|
|
|
# Helper variable for proxying websockets.
|
|
map $http_upgrade $connection_upgrade {
|
|
default upgrade;
|
|
'' close;
|
|
}
|
|
|
|
|
|
# Specifies the main log format.
|
|
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
'$status $body_bytes_sent "$http_referer" '
|
|
'"$http_user_agent" "$http_x_forwarded_for"';
|
|
|
|
|
|
# Includes automatic virtual hosts configs.
|
|
include /etc/nginx/active/automatic/grpc/*.conf;
|
|
include /etc/nginx/active/automatic/http/*.conf;
|
|
include /etc/nginx/active/automatic/http2/*.conf;
|
|
|
|
# Includes manual configs
|
|
include /etc/nginx/active/manual/grpc/*.conf;
|
|
include /etc/nginx/active/manual/http/*.conf;
|
|
include /etc/nginx/active/manual/http2/*.conf;
|
|
include /etc/nginx/active/manual/custom/*.conf;
|
|
|
|
}
|
|
|
|
stream {
|
|
|
|
# Include automatic stream config
|
|
include /etc/nginx/active/automatic/stream/*.conf;
|
|
|
|
# Include manual configs
|
|
include /etc/nginx/active/manual/stream/*.conf;
|
|
|
|
} |