Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Set FastCGI response header in logs

$
0
0
Hello,
I'va a FastCGI application that authenticates users and set username in a "Lm-Remote-User" header. I'm trying to set username in nginx logs:

log_format lm_combined '$remote_addr - $lmremote_user [$time_local] ...;
access_log conf/nginx.log lm_combined;
...
server {
...
location ~ .*\.psgi)(?:$|/) {
set $lmremote_user $http_lm_remote_user;
...
}
}

Logs never contains usernames and debug shows says that $lmremote_user isn't initializated (I verified that header is set).
Is ther a way to catch response header and set it in logs ?

Regards,
Xavier

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>