Welcome! Log In Create A New Profile


Custom log format user_agent

Posted by Dentmaged52 
Custom log format user_agent
January 23, 2019 04:16PM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 64
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready