vkholodkov/nginx-udplog-module — Issue #3: Impossible to log to a distant server.
Author: xbeaudouin
Created: 2011-12-13 22:18:29+00:00
State: open

Hi there,

I am trying to use the current main ngx_udplogger (main branch) under freebsd... but it doesn't seems to works.

I use this kind of configuration :

--//--
user nobody;
worker_processes 1;

#error_log logs/error.log;
error_log logs/error.log notice;
#error_log logs/error.log info;
#error_log logs/error.log debug;

#pid logs/nginx.pid;

events {
use kqueue;
worker_connections 4096;
}

http {
## Hashing virtual hosts
server_names_hash_max_size 1024;
server_names_hash_bucket_size 128;

## MIME Types
include mime.types;
default_type application/octet-stream;

## Log formats
log_format main '$remote_addr - $remote_user [$time_local] $request
'
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

keepalive_timeout 55;
sendfile on;
tcp_nopush on;
tcp_nodelay on;

## UDP Log
access_udplog on;
udplog_tag main;

# Main Server
server {
udplog_tag default;
#access_udplog off;
access_log off;
listen *:8080;
listen [::]:8080;
server_name _;
server_name_in_redirect off;
location / {
index index.html;
root /http/default;
}
}

# Virtual Servers

server {
listen *:8080;
listen [::]:8080;
server_name fqdn.com www.fqdn.com;

access_udplog 172.31.x.x:514 main bare;
#udplog_priority local7.info;
udplog_tag fqdn.com;
access_log off;

index index.php index.html index.htm;
location / {
root /http/fqdn.com;
}

#error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /hosting/http/default;
}

# serve static files directly
location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ {
#access_log off;
expires max;
}

# pass the PHP scripts to php-fpm server listening on 127.0.0.1:9000
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /http/fqdn.com$fastcgi_script_name;
include fastcgi_params;
}

location ~ /\.ht {
deny all;
}
}

}
--//--

I have tried some tricks to make this but when I try to see if www.fdqn.com can log into udplog I don't have any chance to make it logging.

When diving into the code, I see that ulcf->off is always true (eg = 1).

Where if the trick to make it working.... ?

Thanks