fix missing port, fix err log level

This commit is contained in:
Arthur Lu 2023-12-12 18:54:32 +00:00
parent 5eac025ffe
commit 5417c7f314
4 changed files with 19 additions and 4 deletions

14
conf.d/stream.conf Normal file
View File

@ -0,0 +1,14 @@
# /etc/nginx/conf.d/stream.conf
stream {
# Specifies the main log format.
log_format main '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
access_log /var/log/nginx/stream.log main;
# Includes servers configs.
include stream.d/*.conf;
}

1
modules/10_stream.conf Normal file
View File

@ -0,0 +1 @@
load_module "modules/ngx_stream_module.so";

View File

@ -43,8 +43,8 @@ stream {
'$protocol stat:$status bs:$bytes_sent br:$bytes_received '
st:'$session_time';
access_log access.log basic;
error_log error.log basic;
error_log error.log;
# include stream
include stream/*.conf;
}
}

View File

@ -1,5 +1,5 @@
server {
listen 25565 reuseport;
proxy_timeout 30s;
proxy_pass minecraft.root;
}
proxy_pass minecraft.root:25565;
}