mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2026-01-21 19:25:43 +00:00
Added logging for streams based on port
This commit is contained in:
@@ -12,6 +12,9 @@ server {
|
||||
|
||||
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
|
||||
|
||||
access_log /data/logs/stream-{{ id }}_access.log stream;
|
||||
error_log /data/logs/stream-{{ id }}_error.log warn;
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_stream[.]conf;
|
||||
include /data/nginx/custom/server_stream_tcp[.]conf;
|
||||
@@ -25,9 +28,12 @@ server {
|
||||
|
||||
proxy_pass {{ forwarding_host }}:{{ forwarding_port }};
|
||||
|
||||
access_log /data/logs/stream-{{ id }}_access.log stream;
|
||||
error_log /data/logs/stream-{{ id }}_error.log warn;
|
||||
|
||||
# Custom
|
||||
include /data/nginx/custom/server_stream[.]conf;
|
||||
include /data/nginx/custom/server_stream_udp[.]conf;
|
||||
}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
@@ -8,8 +8,8 @@ server {
|
||||
set $port "80";
|
||||
|
||||
server_name localhost-nginx-proxy-manager;
|
||||
access_log /data/logs/fallback_access.log standard;
|
||||
error_log /data/logs/fallback_error.log warn;
|
||||
access_log /data/logs/fallback_http_access.log standard;
|
||||
error_log /data/logs/fallback_http_error.log warn;
|
||||
include conf.d/include/assets.conf;
|
||||
include conf.d/include/block-exploits.conf;
|
||||
include conf.d/include/letsencrypt-acme-challenge.conf;
|
||||
@@ -30,7 +30,7 @@ server {
|
||||
set $port "443";
|
||||
|
||||
server_name localhost;
|
||||
access_log /data/logs/fallback_access.log standard;
|
||||
access_log /data/logs/fallback_http_access.log standard;
|
||||
error_log /dev/null crit;
|
||||
include conf.d/include/ssl-ciphers.conf;
|
||||
ssl_reject_handshake on;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
|
||||
log_format standard '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"';
|
||||
|
||||
access_log /data/logs/fallback_access.log proxy;
|
||||
access_log /data/logs/fallback_http_access.log proxy;
|
||||
3
docker/rootfs/etc/nginx/conf.d/include/log-stream.conf
Normal file
3
docker/rootfs/etc/nginx/conf.d/include/log-stream.conf
Normal file
@@ -0,0 +1,3 @@
|
||||
log_format stream '[$time_local] [Client $remote_addr:$remote_port] $protocol $status $bytes_sent $bytes_received $session_time [Sent-to $upstream_addr] [Sent $upstream_bytes_sent] [Received $upstream_bytes_received] [Time $upstream_connect_time] $ssl_protocol $ssl_cipher';
|
||||
|
||||
access_log /data/logs/fallback_stream_access.log stream;
|
||||
@@ -47,7 +47,7 @@ http {
|
||||
proxy_cache_path /var/lib/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
|
||||
|
||||
# Log format and fallback log file
|
||||
include /etc/nginx/conf.d/include/log.conf;
|
||||
include /etc/nginx/conf.d/include/log-proxy.conf;
|
||||
|
||||
# Dynamically generated resolvers file
|
||||
include /etc/nginx/conf.d/include/resolvers.conf;
|
||||
@@ -85,6 +85,9 @@ http {
|
||||
}
|
||||
|
||||
stream {
|
||||
# Log format and fallback log file
|
||||
include /etc/nginx/conf.d/include/log-stream.conf;
|
||||
|
||||
# Files generated by NPM
|
||||
include /data/nginx/stream/*.conf;
|
||||
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
"column.provider": {
|
||||
"defaultMessage": "공급자"
|
||||
},
|
||||
"column.roles": {
|
||||
"column.roles": {
|
||||
"defaultMessage": "권한"
|
||||
},
|
||||
"column.rules": {
|
||||
|
||||
Reference in New Issue
Block a user