Hi,
We have used openresty for login page platform. User enters email address & receives an OTP and directs to the our page.
However, when I check the nginx access log (/usr/local/openresty/nginx/logs), username field ($remote_user) is empty.
84.51.10111 - - [06/Jan/2022:12:25:42 +0000] "GET /mail-otp-auth.intf HTTP/1.1" 200 4855 "https:/abcd.com/mail-otp-auth.intf" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36" "-" "-"
Log format likes that;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" "$sent_http_x_forwarded_for"';
How can we get the username field? Any different methods are welcome
Thank you,