Verified Commit 6bf14014 authored by Florian Pritz's avatar Florian Pritz
Browse files

Define and use our own log format for nginx



This is the same as used on luna and as expected by the zabbix nginx
monitoring service.

Signed-off-by: Florian Pritz's avatarFlorian Pritz <bluewind@xinu.at>
parent 4f0e0410
......@@ -4,7 +4,7 @@ server {
server_name {{ arch32_mirror_domain }} pool.mirror.archlinux32.org;
root {{ arch32_mirror_dir }};
access_log /var/log/nginx/{{ arch32_mirror_domain }}/access.log;
access_log /var/log/nginx/{{ arch32_mirror_domain }}/access.log main;
error_log /var/log/nginx/{{ arch32_mirror_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -18,7 +18,7 @@ server {
server_name {{ arch32_mirror_domain }};
root {{ arch32_mirror_dir }};
access_log /var/log/nginx/{{ arch32_mirror_domain }}/access.log;
access_log /var/log/nginx/{{ arch32_mirror_domain }}/access.log main;
error_log /var/log/nginx/{{ arch32_mirror_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ arch32_mirror_domain }}/fullchain.pem;
......
......@@ -3,7 +3,7 @@ server {
listen [::]:80;
server_name {{ archive_domain }};
access_log /var/log/nginx/{{ archive_domain }}/access.log;
access_log /var/log/nginx/{{ archive_domain }}/access.log main;
error_log /var/log/nginx/{{ archive_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -18,7 +18,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ archive_domain }};
access_log /var/log/nginx/{{ archive_domain }}/access.log;
access_log /var/log/nginx/{{ archive_domain }}/access.log main;
error_log /var/log/nginx/{{ archive_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ archive_domain }}/fullchain.pem;
......
......@@ -9,7 +9,7 @@ server {
listen [::]:80;
server_name {{ domain }};
access_log /var/log/nginx/{{ archweb_domain }}/access.log;
access_log /var/log/nginx/{{ archweb_domain }}/access.log main;
error_log /var/log/nginx/{{ archweb_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -24,7 +24,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ domain }};
access_log /var/log/nginx/{{ archweb_domain }}/access.log;
access_log /var/log/nginx/{{ archweb_domain }}/access.log main;
error_log /var/log/nginx/{{ archweb_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ archweb_domain }}/fullchain.pem;
......@@ -51,7 +51,7 @@ server {
listen [::]:80;
server_name {{ archweb_domain }};
access_log /var/log/nginx/{{ archweb_domain }}/access.log;
access_log /var/log/nginx/{{ archweb_domain }}/access.log main;
error_log /var/log/nginx/{{ archweb_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -71,7 +71,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ archweb_domain }};
access_log /var/log/nginx/{{ archweb_domain }}/access.log;
access_log /var/log/nginx/{{ archweb_domain }}/access.log main;
error_log /var/log/nginx/{{ archweb_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ archweb_domain }}/fullchain.pem;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ flyspray_domain }};
access_log /var/log/nginx/{{ flyspray_domain }}/access.log;
access_log /var/log/nginx/{{ flyspray_domain }}/access.log main;
error_log /var/log/nginx/{{ flyspray_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ flyspray_domain }};
access_log /var/log/nginx/{{ flyspray_domain }}/access.log;
access_log /var/log/nginx/{{ flyspray_domain }}/access.log main;
error_log /var/log/nginx/{{ flyspray_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ flyspray_domain }}/fullchain.pem;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ grafana_domain }};
access_log /var/log/nginx/{{ grafana_domain }}/access.log;
access_log /var/log/nginx/{{ grafana_domain }}/access.log main;
error_log /var/log/nginx/{{ grafana_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ grafana_domain }};
access_log /var/log/nginx/{{ grafana_domain }}/access.log;
access_log /var/log/nginx/{{ grafana_domain }}/access.log main;
error_log /var/log/nginx/{{ grafana_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ grafana_domain }}/fullchain.pem;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ kanboard_domain }};
access_log /var/log/nginx/{{ kanboard_domain }}/access.log;
access_log /var/log/nginx/{{ kanboard_domain }}/access.log main;
error_log /var/log/nginx/{{ kanboard_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ kanboard_domain }};
access_log /var/log/nginx/{{ kanboard_domain }}/access.log;
access_log /var/log/nginx/{{ kanboard_domain }}/access.log main;
error_log /var/log/nginx/{{ kanboard_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ kanboard_domain }}/fullchain.pem;
......
......@@ -3,7 +3,7 @@ server {
listen [::]:80;
server_name mailman.archlinux.org;
access_log /var/log/nginx/{{ mailman_domain }}/access.log;
access_log /var/log/nginx/{{ mailman_domain }}/access.log main;
error_log /var/log/nginx/{{ mailman_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -18,7 +18,7 @@ server {
listen [::]:443 ssl http2;
server_name mailman.archlinux.org;
access_log /var/log/nginx/{{ mailman_domain }}/access.log;
access_log /var/log/nginx/{{ mailman_domain }}/access.log main;
error_log /var/log/nginx/{{ mailman_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/mailman.archlinux.org/fullchain.pem;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ matrix_domain }};
access_log /var/log/nginx/{{ matrix_domain }}/access.log;
access_log /var/log/nginx/{{ matrix_domain }}/access.log main;
error_log /var/log/nginx/{{ matrix_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ matrix_domain }};
access_log /var/log/nginx/{{ matrix_domain }}/access.log;
access_log /var/log/nginx/{{ matrix_domain }}/access.log main;
error_log /var/log/nginx/{{ matrix_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ matrix_domain }}/fullchain.pem;
......
......@@ -13,6 +13,10 @@ http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr $host $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for" $request_time';
sendfile on;
keepalive_timeout 65;
client_max_body_size 16M;
......@@ -26,7 +30,7 @@ http {
index index.php index.html index.htm;
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_http;
access_log syslog:server=unix:/dev/log,nohostname,tag=nginx_http main;
include snippets/sslsettings.conf;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ patchwork_domain }};
access_log /var/log/nginx/{{ patchwork_domain }}/access.log;
access_log /var/log/nginx/{{ patchwork_domain }}/access.log main;
error_log /var/log/nginx/{{ patchwork_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ patchwork_domain }};
access_log /var/log/nginx/{{ patchwork_domain }}/access.log;
access_log /var/log/nginx/{{ patchwork_domain }}/access.log main;
error_log /var/log/nginx/{{ patchwork_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ patchwork_domain }}/fullchain.pem;
......
......@@ -3,7 +3,7 @@ server {
listen [::]:80;
server_name {{ planet_domain }};
access_log /var/log/nginx/{{ planet_domain }}/access.log;
access_log /var/log/nginx/{{ planet_domain }}/access.log main;
error_log /var/log/nginx/{{ planet_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -18,7 +18,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ planet_domain }};
access_log /var/log/nginx/{{ planet_domain }}/access.log;
access_log /var/log/nginx/{{ planet_domain }}/access.log main;
error_log /var/log/nginx/{{ planet_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ planet_domain }}/fullchain.pem;
......
......@@ -4,7 +4,7 @@ server {
server_name {{ public_domain }} www.{{ public_domain }};
root /srv/public_html;
access_log /var/log/nginx/{{ public_domain }}/access.log;
access_log /var/log/nginx/{{ public_domain }}/access.log main;
error_log /var/log/nginx/{{ public_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
server_name {{ public_domain }} www.{{ public_domain }};
root /srv/public_html;
access_log /var/log/nginx/{{ public_domain }}/access.log;
access_log /var/log/nginx/{{ public_domain }}/access.log main;
error_log /var/log/nginx/{{ public_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ public_domain }}/fullchain.pem;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ security_tracker_domain }};
access_log /var/log/nginx/{{ security_tracker_domain }}/access.log;
access_log /var/log/nginx/{{ security_tracker_domain }}/access.log main;
error_log /var/log/nginx/{{ security_tracker_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ security_tracker_domain }};
access_log /var/log/nginx/{{ security_tracker_domain }}/access.log;
access_log /var/log/nginx/{{ security_tracker_domain }}/access.log main;
error_log /var/log/nginx/{{ security_tracker_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ security_tracker_domain }}/fullchain.pem;
......
......@@ -3,7 +3,7 @@ server {
listen [::]:80;
server_name {{ sources_domain }};
access_log /var/log/nginx/{{ sources_domain }}/access.log;
access_log /var/log/nginx/{{ sources_domain }}/access.log main;
error_log /var/log/nginx/{{ sources_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -18,7 +18,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ sources_domain }};
access_log /var/log/nginx/{{ sources_domain }}/access.log;
access_log /var/log/nginx/{{ sources_domain }}/access.log main;
error_log /var/log/nginx/{{ sources_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ sources_domain }}/fullchain.pem;
......
......@@ -4,7 +4,7 @@ server {
server_name {{ mirror_domain }};
root /srv/ftp;
access_log /var/log/nginx/{{ mirror_domain }}/access.log;
access_log /var/log/nginx/{{ mirror_domain }}/access.log main;
error_log /var/log/nginx/{{ mirror_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -18,7 +18,7 @@ server {
server_name {{ mirror_domain }};
root /srv/ftp;
access_log /var/log/nginx/{{ mirror_domain }}/access.log;
access_log /var/log/nginx/{{ mirror_domain }}/access.log main;
error_log /var/log/nginx/{{ mirror_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ mirror_domain }}/fullchain.pem;
......
......@@ -7,7 +7,7 @@ server {
listen [::]:80;
server_name {{ zabbix_domain }};
access_log /var/log/nginx/{{ zabbix_domain }}/access.log;
access_log /var/log/nginx/{{ zabbix_domain }}/access.log main;
error_log /var/log/nginx/{{ zabbix_domain }}/error.log;
include snippets/letsencrypt.conf;
......@@ -22,7 +22,7 @@ server {
listen [::]:443 ssl http2;
server_name {{ zabbix_domain }};
access_log /var/log/nginx/{{ zabbix_domain }}/access.log;
access_log /var/log/nginx/{{ zabbix_domain }}/access.log main;
error_log /var/log/nginx/{{ zabbix_domain }}/error.log;
ssl_certificate /etc/letsencrypt/live/{{ zabbix_domain }}/fullchain.pem;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment