Welcome! Log In Create A New Profile

Advanced

Re: access_logging in the stream block

Maxim Konovalov
December 15, 2016 04:28AM
Hello,

On 12/14/16 10:13 PM, kms-pt wrote:
> Hello,
>
> Just wondering if anyone knows if access_logs are able to be configured in
> the stream block. We are looking to implement TCP stream which works but
> also have the requirement of logging the connections, transactions, etc. I
> know error_log can be enabled but I have found no documentation stating
> access_log will work.
>
> We have confirmed connections via nginx will work and can connect to the
> backend service but no actions are logged.
>
>
> Sample config:
>
> stream {
> server {
> listen 12345;
> proxy_pass servername:12345;
>
> }
> }
>
> I have tried adding access_log but only get the error:
> Starting nginx: nginx: [emerg] "access_log" directive is not allowed here in
> /etc/nginx/nginx.conf:22
>
> I also tried adding a log_format section in the event that was required. Any
> advice/suggestions welcome.
>
You are probably using an old version of nginx --
ngx_stream_log_module was added in nginx-1.11.4.

--
Maxim Konovalov
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

access_logging in the stream block

kms-pt December 14, 2016 02:13PM

Re: access_logging in the stream block

Maxim Konovalov December 15, 2016 04:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 152
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready