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

Custom log format user_agent

$
0
0
Hi there.

i try to setup a server with a "stream" segment in the configuration.That works as expected. I defined some basic logfile format for acces.log. It looks like the following now:

stream {
log_format basic '$remote_addr [$time_local] $protocol $status $bytes_sent bytes send - $bytes_received bytes received - $session_time session time - $upstream_addr';
}

I wonder if there is some way to identify clients. Is there some equivalent for $http_user_agent or some similar thing? And what i also miss there is a $request variable. Both variables seems not existing in stream context. The only reason i want to identify the client is, that i would only allow access for some clients and denie access for others.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



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