Nginx config: small fix for via header and backend var
@@ -30,10 +30,9 @@ http {
default "-";
}
- #Nginx does not support Via header by default, omitting it in logs
# Based on
# https://github.com/outflanknl/RedELK/blob/master/example-data-and-configs/Apache/redelk-redir-apache.conf
- log_format redelklog '[$time_local] $redir_hostname nginx[$pid]: frontend:$frontend_name/$server_addr:$server_port backend:$backend_name client:$remote_addr:$remote_port xforwardedfor:$http_x_forwarded_for headers:{$http_user_agent|$host|$http_x_forwarded_for|$http_x_forwarded_proto|$http_x_forwarded_host|$proxy_add_forwarded|-|} statuscode:$status request:$request';
+ log_format redelklog '[$time_local] $redir_hostname nginx[$pid]: frontend:$frontend_name/$server_addr:$server_port backend:$backend_name client:$remote_addr:$remote_port xforwardedfor:$http_x_forwarded_for headers:{$http_user_agent|$host|$http_x_forwarded_for|$http_x_forwarded_proto|$http_x_forwarded_host|$proxy_add_forwarded|$http_via|} statuscode:$status request:$request';
##
# Basic Settings
@@ -111,6 +110,7 @@ http {
# C2 autossh tunnel
location ~* ^/(hello\.html|bye\.html)$ {
+ set $backend_name c2;
proxy_pass https://127.0.0.1:4433;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
@@ -118,6 +118,7 @@ http {
# Decoy
location / {
+ set $backend_name decoy;
proxy_pass https://www.google.com;
proxy_set_header Host www.google.com;
}
