1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
| stream {
log_format proxy '$remote_addr [$time_local] ' '$protocol $status $bytes_sent $bytes_received ' '$session_time "$upstream_addr" ' '"$upstream_bytes_sent" "$upstream_bytes_received" "$upstream_connect_time"';
log_format basic '$proxy_protocol_addr - [$time_local] ' '$protocol $status $bytes_sent $bytes_received ' '$session_time';
upstream backend { hash $remote_addr consistent;
server 0.0.0.0:5001; } server { listen 8081 ; proxy_pass 127.0.0.1:5001; proxy_bind 127.0.0.1 ;# $remote_addr; proxy_timeout 1s; proxy_responses 1;
# proxy_bind $remote_addr transparent; # proxy_protocol on;
#real_ip_header proxy_protocol; # client_max_body_size 4G;
# set_real_ip_from 10.1.0.68/24; # proxy_timeout 20s; # proxy_pass backend; # real_ip_header proxy_protocol; # proxy_buffer_size 256k; access_log /var/log/nginx/logtest_access.log proxy; # access_log /var/log/nginx/logtest_access.log basic; error_log /var/log/nginx/logtest_error.log; # set_real_ip_from 0.0.0.0/0; # real_ip_header X-Real-IP; # real_ip_recursive on; # set_real_ip_from 172.17.32.83; # set_real_ip_from $remote_addr; # set_real_ip_from $realip_remote_addr;
#proxy_connect_timeout 10s; #proxy_timeout 30s;
#real_ip_recursive on;
#real_ip_header X-Real-IP; } }
|