Skip to content
Snippets Groups Projects
Verified Commit e3a695d3 authored by Jan Alexander Steffens (heftig)'s avatar Jan Alexander Steffens (heftig)
Browse files

nginx: Log to syslog by default

Suppress nginx's stdout/stderr because it's not possible to stop nginx
from logging to stderr once it has been enabled, and it's enabled by
default (via compilation option).

Move the error_log to the root context as it applies to more than http.

The logrotate setup installed by nginx doesn't actually rotate the text
log files we've been using.

planet and sources roles still install configs that use text log files.
parent 4786e359
No related branches found
No related tags found
No related merge requests found
[Service]
StandardOutput=null
......@@ -3,6 +3,9 @@
- name: install nginx
pacman: name=nginx,certbot state=present
- name: install nginx.service snippet
copy: src=nginx.service.d dest=/etc/systemd/system/nginx.service.d/local.conf owner=root group=root mode=0644
- name: configure nginx
template: src=nginx.conf.j2 dest=/etc/nginx/nginx.conf owner=root group=root mode=0644
notify:
......
......@@ -4,6 +4,8 @@ events {
worker_connections 1024;
}
error_log syslog:server=unix:/dev/log,nohostname info;
http {
include mime.types;
default_type application/octet-stream;
......@@ -14,8 +16,7 @@ http {
index index.php index.html index.htm;
access_log /var/log/nginx/default/access.log;
error_log /var/log/nginx/default/error.log;
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_http;
include snippets/sslsettings.conf;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment