Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit 60e3d5d5 authored by Sreeram R's avatar Sreeram R 🦇
Browse files

Get client IP in nginx logs from x-Forward-For header

parent 3af59da0
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -14,9 +14,10 @@ http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$remote_addr"';
    log_format main '$http_x_forwarded_for - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent"';


    error_log  /var/log/nginx/spot-error.log warn;
    access_log  /var/log/nginx/spot-access.log main;