Nginx udplog module (v 1.0.0)

rus eng

This module implements logging via BSD Syslog Protocol for nginx web server (RFC 3164).


The module sends access log messages via BSD Syslog Protocol to specified host at port 514 using User Datagram Protocol (UDP) as transport.

Configuration directives

syntax: access_udplog <hostname | IP address | off> [ <log format> ]
default: N/A
severity: optional
context: main, server, location, if, limit_access

Enables logging via BSD Syslog Protocol. Applies only to access log messages. The first argument specifies the name of the host where the messages will be sent to. The second argument specifies the name of format of log messages, defined by the directive log_format. If the argument is omitted, "combined" will be used.

The facility of log messages is Local7 (23), severity is Info (6) and they currently could not be changed.

Multiple occurances of this directive instruct nginx to send every log message to multiple hosts.

Example configuration

server {



    location /test {
        access_udplog off;


Example output

$ tail -f /var/log/messages
Jan  5 20:12:06 iva syslogd 1.5.0#5ubuntu3: restart (remote reception).
Jan  5 20:19:56 iva.local iva - - [05/Jan/2010:20:19:56 +0100] "GET /a HTTP/1.1" 404 169 "-" "Mozilla/5.0 (X11; U; Linux i686; ru; rv: Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"
Jan  5 20:27:20 iva.local iva - - [05/Jan/2010:20:27:20 +0100] "GET / HTTP/1.1" 200 151 "-" "Mozilla/5.0 (X11; U; Linux i686; ru; rv: Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"
Jan  5 20:28:05 iva.local iva - - [05/Jan/2010:20:28:05 +0100] "GET /upload.html HTTP/1.1" 200 501 "-" "Mozilla/5.0 (X11; U; Linux i686; ru; rv: Gecko/2009090216 Ubuntu/9.04 (jaunty) Firefox/3.0.14"


Latest version 1.0.0:
or go to
download area

Browse repository

How to use

Download sources from one of the links above. Unpack the archive:

tar xvzf nginx_udplog_module-1.0.0.tar.gz

Configure nginx with additional module:

cd <path to nginx sources>
./configure --add-module=<path to udplog module sources>
make install


nginx -- is a web-server, developed by Igor Sysoev.


The above-described module is an addition to nginx web-server, nevertheless they are independent products. The licence of above-described module is BSD You should have received a copy of license along with the source code. By using the materials from this site you automatically agree to the terms and conditions of this license. If you don't agree to the terms and conditions of this license, you must immediately remove from your computer all materials downloaded from this site.

Contact author

Valery Kholodkov
Please use address extension while composing an Email to me.

Copyright (C) 2009 Valery Kholodkov
Module copyright notices see in module sources.