Welcome! Log In Create A New Profile

Advanced

Nginx not logging to socket.

Andrew Holway
June 21, 2015 08:20AM
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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Nginx not logging to socket.

Andrew Holway June 21, 2015 08:20AM

Re: Nginx not logging to socket.

djczaski June 24, 2015 06:14AM

Re: Nginx not logging to socket

Vladimir Homutov June 24, 2015 07:04AM

Re: Nginx not logging to socket

djczaski June 24, 2015 08:32AM

Re: Nginx not logging to socket

Vladimir Homutov June 24, 2015 10:02AM

Re: Nginx not logging to socket

djczaski June 24, 2015 10:22AM

Re: Nginx not logging to socket

Vladimir Homutov June 24, 2015 10:46AM

Re: Nginx not logging to socket

djczaski June 24, 2015 07:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 274
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