2023-05-10 03:41:30 +00:00
|
|
|
user nginx;
|
2023-04-01 04:18:56 +00:00
|
|
|
worker_processes auto;
|
2023-12-12 02:53:46 +00:00
|
|
|
pcre_jit on;
|
2023-12-12 18:52:18 +00:00
|
|
|
load_module /usr/lib/nginx/modules/ngx_stream_module.so;
|
2023-04-01 04:18:56 +00:00
|
|
|
events {
|
|
|
|
worker_connections 768;
|
|
|
|
}
|
|
|
|
http {
|
2023-12-12 02:53:46 +00:00
|
|
|
server_tokens off;
|
2023-04-01 04:18:56 +00:00
|
|
|
sendfile on;
|
|
|
|
tcp_nopush on;
|
|
|
|
types_hash_max_size 2048;
|
|
|
|
|
2023-04-27 22:47:27 +00:00
|
|
|
# mime types
|
2023-12-12 02:47:38 +00:00
|
|
|
include mime.types;
|
2023-04-01 04:18:56 +00:00
|
|
|
default_type application/octet-stream;
|
|
|
|
|
2023-04-27 22:47:27 +00:00
|
|
|
# logging
|
2024-09-19 00:28:45 +00:00
|
|
|
access_log /var/log/nginx/access.log;
|
|
|
|
error_log /var/log/nginx/error.log;
|
2023-04-01 04:18:56 +00:00
|
|
|
|
2023-04-27 22:47:27 +00:00
|
|
|
# gzip
|
2023-04-01 04:18:56 +00:00
|
|
|
gzip on;
|
2023-04-01 04:32:29 +00:00
|
|
|
gzip_vary on;
|
|
|
|
gzip_proxied any;
|
|
|
|
gzip_comp_level 6;
|
|
|
|
gzip_buffers 16 8k;
|
|
|
|
gzip_http_version 1.1;
|
|
|
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
|
2023-04-01 04:18:56 +00:00
|
|
|
|
2023-04-27 22:47:27 +00:00
|
|
|
# ssl parameters
|
2023-12-12 02:47:38 +00:00
|
|
|
include ssl-params.conf;
|
2023-04-27 22:47:27 +00:00
|
|
|
|
|
|
|
# proxy parameters
|
2023-12-12 02:47:38 +00:00
|
|
|
include proxy-params.conf;
|
2023-04-27 22:57:33 +00:00
|
|
|
|
2024-09-09 19:34:14 +00:00
|
|
|
# enable http2
|
|
|
|
http2 on;
|
|
|
|
|
2023-12-12 18:14:10 +00:00
|
|
|
# include http
|
|
|
|
include http/*.conf;
|
2023-04-01 04:18:56 +00:00
|
|
|
}
|
2023-12-12 18:14:10 +00:00
|
|
|
stream {
|
|
|
|
# logging
|
2023-12-12 18:52:18 +00:00
|
|
|
log_format basic '$remote_addr:$remote_port - $time_local '
|
|
|
|
'$protocol stat:$status bs:$bytes_sent br:$bytes_received '
|
|
|
|
st:'$session_time';
|
|
|
|
access_log access.log basic;
|
2023-12-12 18:54:32 +00:00
|
|
|
error_log error.log;
|
2023-12-12 18:14:10 +00:00
|
|
|
|
|
|
|
# include stream
|
|
|
|
include stream/*.conf;
|
2023-12-12 18:54:32 +00:00
|
|
|
}
|