Nginx not logging to socket.

Andrew Holway andrew.holway at otternetworks.de
Sun Jun 21 12:19:06 UTC 2015


Hallo!

Using rsyslog I have set up a logging socket and confirmed that its working
by piping in some stuff to "logger -u /dev/log"
nginx/1.8.0 does not seem to be dumping in logs however. The nginx config
is below..

I'm probably doing something dumb. This is the first time I set this up.

Cheers,

Andrew

# For more information on configuration, see:

#   * Official English Documentation: http://nginx.org/en/docs/

#   * Official Russian Documentation: http://nginx.org/ru/docs/


user nginx;

worker_processes 4;

#error_log /var/log/nginx/error.log debug;

error_log syslog:server=unix:/dev/log debug;

pid /run/nginx.pid;


events {

    worker_connections 1024;

}


http {


# Log to Rsyslog socket


log_format syslog '$remote_addr $host:$server_port "$request" $status
$body_bytes_sent "$http_referer" "$http_user_agent"';

access_log syslog:server=unix:/dev/log syslog;


#    log_format  main  '$remote_addr - $remote_user [$time_local]
"$request" '

#                      '$status $body_bytes_sent "$http_referer" '

#                      '"$http_user_agent" "$http_x_forwarded_for"';

#

#    access_log  /var/log/nginx/access.log  main;


    sendfile            on;

    tcp_nopush          on;

    tcp_nodelay         on;

    keepalive_timeout   65;

    types_hash_max_size 2048;


    include             /etc/nginx/mime.types;

    default_type        application/octet-stream;


    # Load modular configuration files from the /etc/nginx/conf.d directory.

    # See http://nginx.org/en/docs/ngx_core_module.html#include

    # for more information.

    include /etc/nginx/conf.d/*.conf;


}





-- 
Otter Networks UG
http://otternetworks.de
fon: +49 30 54 88 5197
Gotenstraße 17
10829 Berlin



-- 
Otter Networks UG
http://otternetworks.de
fon: +49 30 54 88 5197
Gotenstraße 17
10829 Berlin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20150621/6f12609b/attachment.html>


More information about the nginx mailing list