From 0de4e829c5e4d79485b68684e3303f85a430de31 Mon Sep 17 00:00:00 2001 From: Alex Kotov Date: Wed, 15 Jul 2020 01:43:11 +0500 Subject: [PATCH] Fix syslog facilities --- README.md | 11 +++++++++++ files/apache/syslog.conf | 4 ++-- files/nginx/syslog.conf | 4 ++-- 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..978c964 --- /dev/null +++ b/README.md @@ -0,0 +1,11 @@ +Ansible Role - Common +===================== + +Syslog facilities: + +* `local7` - web servers (Nginx, Apache) + +Syslog tags: + +* `nginx` - Nginx web server +* `httpd` - Apache web server diff --git a/files/apache/syslog.conf b/files/apache/syslog.conf index 9add43d..938ad63 100644 --- a/files/apache/syslog.conf +++ b/files/apache/syslog.conf @@ -1,2 +1,2 @@ -CustomLog "| /usr/bin/logger -thttpd -plocal6.info" combined -ErrorLog "| /usr/bin/logger -thttpd -plocal6.error" +CustomLog "| /usr/bin/logger -plocal7.info -thttpd" combined +ErrorLog "| /usr/bin/logger -plocal7.error -thttpd" diff --git a/files/nginx/syslog.conf b/files/nginx/syslog.conf index ae738f7..4ac957e 100644 --- a/files/nginx/syslog.conf +++ b/files/nginx/syslog.conf @@ -1,2 +1,2 @@ -access_log syslog:server=unix:/dev/log,tag=nginx,facility=local7,severity=info; -error_log syslog:server=unix:/dev/log,tag=nginx,facility=local7,severity=error; +access_log syslog:server=unix:/dev/log,facility=local7,severity=info,tag=nginx; +error_log syslog:server=unix:/dev/log,facility=local7,severity=error,tag=nginx;