Show domain in logs rather than upstream

The upstream is always the same, and no use to us
This commit is contained in:
Jake Howard 2022-01-19 09:00:20 +00:00
parent 619d5bfa7b
commit 1db289b604
Signed by: jake
GPG key ID: 57AFB45680EDD477
2 changed files with 7 additions and 3 deletions

View file

@ -36,15 +36,17 @@ stream {
log_format access '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'$session_time "$ssl_preread_server_name" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
log_format ips '$remote_addr [$time_local] $upstream_addr';
log_format ips '$remote_addr [$time_local] $ssl_preread_server_name';
access_log /var/log/nginx/access.log access;
access_log /var/log/nginx/ips.log ips;
ssl_preread on;
server {
listen 443;
listen 8448;

View file

@ -35,11 +35,13 @@ stream {
log_format access '$remote_addr [$time_local] '
'$protocol $status $bytes_sent $bytes_received '
'$session_time "$upstream_addr" '
'$session_time "$ssl_preread_server_name" '
'"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
access_log /var/log/nginx/access.log access;
ssl_preread on;
# Internal LAN route
server {
listen 443;