mirror of
https://github.com/bitnami/containers.git
synced 2026-03-05 16:17:21 +08:00
redirect nginx logs to stdout/stderr
This commit is contained in:
@@ -8,6 +8,10 @@ check_for_updates &
|
||||
if [[ "$1" == "nami" && "$2" == "start" ]] || [[ "$(basename $1)" == "nginx" ]] || [[ "$1" == "/init.sh" ]]; then
|
||||
nami_initialize nginx
|
||||
|
||||
# redirect nginx logs to stdout/stderr
|
||||
ln -sf /dev/stdout /opt/bitnami/nginx/logs/access.log
|
||||
ln -sf /dev/stderr /opt/bitnami/nginx/logs/error.log
|
||||
|
||||
# ensure nginx is not daemonized
|
||||
if [[ "$(basename $1)" == "nginx" ]]; then
|
||||
set -- "$@" -g 'daemon off;'
|
||||
|
||||
Reference in New Issue
Block a user