Using different way to redirect Nginx messages to stdout / stderr

This commit is contained in:
Alexey Pustovalov
2024-01-19 13:17:09 +09:00
parent b771cb15d1
commit bb5de25caa
45 changed files with 105 additions and 91 deletions

View File

@ -79,7 +79,8 @@ RUN set -eux && \
mkdir -p /var/lib/php/session && \
rm -rf /etc/php81/php-fpm.d/www.conf && \
rm -f /etc/nginx/http.d/*.conf && \
ln -sf /dev/fd/2 /var/lib/nginx/logs/error.log && \
ln -sf /dev/stdout /var/log/nginx/access.log && \
ln -sf /dev/stderr /var/log/nginx/error.log && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php conf/maintenance.inc.php conf/zabbix.conf.php.example && \
rm -rf tests && \

View File

@ -2,7 +2,7 @@
worker_processes 5;
worker_rlimit_nofile 256000;
error_log /dev/fd/2 error;
error_log /var/log/nginx/error.log error;
pid /tmp/nginx.pid;
@ -20,8 +20,8 @@ http {
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/fd/1 main;
error_log /dev/fd/2 error;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log error;
client_body_temp_path /tmp/client_body 1 2;
proxy_temp_path /tmp/proxy 1 2;

View File

@ -2,7 +2,7 @@
nodaemon = true
[program:nginx]
command = /usr/sbin/%(program_name)s -g "daemon off;error_log /dev/stdout info;" -c /etc/nginx/%(program_name)s.conf
command = /usr/sbin/%(program_name)s -g "daemon off;error_log /var/log/nginx/error.log error;" -c /etc/nginx/%(program_name)s.conf
auto_start = true
autorestart = true

View File

@ -5,8 +5,8 @@ server {
server_name zabbix;
index index.php;
access_log /dev/fd/1 main;
error_log /dev/fd/2 notice;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log notice;
set $webroot '/usr/share/zabbix';

View File

@ -6,8 +6,8 @@ server {
server_name_in_redirect off;
index index.php;
access_log /dev/fd/1 main;
error_log /dev/fd/2 error;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log error;
set $webroot '/usr/share/zabbix';