46 lines
1006 B
Nginx Configuration File
46 lines
1006 B
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 virtual hosts configs.
|
|
include /etc/nginx/http/*.conf;
|
|
include /etc/nginx/grpc/*.conf;
|
|
}
|
|
|
|
stream {
|
|
|
|
include /etc/nginx/stream*.conf;
|
|
|
|
} |