Client IP ins Log durch Nginx Reverse Proxy

Nginx Reverse Proxy

# nano /etc/nginx/conf.d/proxy.conf

proxy_redirect          off;
proxy_set_header        Host            $host;
proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size    10m;
client_body_buffer_size 128k;
client_header_buffer_size 64k;
proxy_connect_timeout   90;
proxy_send_timeout      90;
proxy_read_timeout      90;
proxy_buffer_size   16k;
proxy_buffers       32   16k;
proxy_busy_buffers_size 64k;

Nginx Webserver

# nano /etc/nignx/conf.d/logging.conf

set_real_ip_from xxx.xxx.xxx.xxx; (IP des reverse proxy)
real_ip_header X-Forwarded-For;
real_ip_recursive on;

Posted by:

PeakSpray

Leave A Comment

Your email address will not be published. Required fields are marked (required):

Bitte rechnen Sie folgendes aus: * Time limit is exhausted. Please reload the CAPTCHA.

Back to Top