mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix(nginx): ensure /var/log/nginx and logs exist; set error_log to /var/log/nginx/error.log
Create /var/log/nginx and touch access.log/error.log in run.sh so nginx -t succeeds before reloads. Revert nginx.conf error_log to /var/log/nginx/error.log (notice).
This commit is contained in:
@@ -3,7 +3,7 @@ load_module modules/ngx_http_js_module.so;
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
|
||||
error_log stderr notice;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ else
|
||||
export PROVISION_SSL=""
|
||||
fi
|
||||
|
||||
# Ensure nginx log destinations exist so nginx -t succeeds even before reloads.
|
||||
mkdir -p /var/log/nginx
|
||||
touch /var/log/nginx/access.log /var/log/nginx/error.log
|
||||
|
||||
# Run envsubst on template
|
||||
/etc/nginx/envsubst-on-templates.sh
|
||||
|
||||
|
||||
Reference in New Issue
Block a user