Hi I am an absolute beginer in Nginx
! I use Nginx as a reverse proxy in front of a shiny server and recognised that Nginx writes two files html
and log
. In access.log
I can see the usernames. The important part of my Nginx config file contains this part
http {
server_tokens off;
include 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" "$http_x_forwarded_for"';
access_log logs/nginx_shiny_access.log;
sendfile on;
keepalive_timeout 65;
auth_ldap_cache_enabled on;
auth_ldap_cache_expiration_time 10000;
auth_ldap_cache_size 1000;
I can see the user names in logs/nginx_shiny_access.log
because of $remote_user
.
How can I get the user names in html
file and just temporary because I need the user names in the application and I do not know how can I get them?
Thank you in advance.