diff --git a/confs/global/nginx.conf b/confs/global/nginx.conf index 09a0c3c..cf3df3b 100644 --- a/confs/global/nginx.conf +++ b/confs/global/nginx.conf @@ -11,7 +11,7 @@ load_module /usr/lib/nginx/modules/ngx_http_brotli_filter_module.so; load_module /usr/lib/nginx/modules/ngx_http_brotli_static_module.so; # run in foreground -daemon off; +# daemon off; # PID file pid /tmp/nginx.pid; diff --git a/entrypoint/entrypoint.sh b/entrypoint/entrypoint.sh index 3921cf0..d8d059d 100644 --- a/entrypoint/entrypoint.sh +++ b/entrypoint/entrypoint.sh @@ -84,7 +84,7 @@ fi # run nginx echo "[*] Running nginx ..." -nginx & +nginx -g 'daemon off;' & pid="$!" # autotest diff --git a/helpers/install.sh b/helpers/install.sh index 1a16546..b19d337 100644 --- a/helpers/install.sh +++ b/helpers/install.sh @@ -196,22 +196,24 @@ if [ ! -d "/opt/bunkerized-nginx/plugins" ] ; then fi # Set permissions for /opt/bunkerized-nginx -echo "[*] Set permissions for /opt/bunkerized-nginx files and folders" +echo "[*] Set permissions on files and folders" do_and_check_cmd chown -R root:nginx /opt/bunkerized-nginx -do_and_check_cmd find /opt -type f -exec chmod 0740 {} \; -do_and_check_cmd find /opt -type d -exec chmod 0750 {} \; +do_and_check_cmd find /opt/bunkerized-nginx -type f -exec chmod 0740 {} \; +do_and_check_cmd find /opt/bunkerized-nginx -type d -exec chmod 0750 {} \; do_and_check_cmd chmod 770 /opt/bunkerized-nginx/cache do_and_check_cmd chmod 770 /opt/bunkerized-nginx/acme-challenge do_and_check_cmd chmod 750 /opt/bunkerized-nginx/scripts/* do_and_check_cmd chmod 750 /opt/bunkerized-nginx/entrypoint/* do_and_check_cmd chmod 750 /opt/bunkerized-nginx/gen/main.py - # Set permissions for /usr/local/bin/bunkerized-nginx do_and_check_cmd chown root:root /usr/local/bin/bunkerized-nginx do_and_check_cmd chmod 750 /usr/local/bin/bunkerized-nginx - # Set permissions for /opt do_and_check_cmd chmod u+rx /opt +# Set permissions for /etc/nginx +do_and_check_cmd chown -R nginx:nginx /etc/nginx +do_and_check_cmd find /etc/nginx -type f -exec chmod 0774 {} \; +do_and_check_cmd find /etc/nginx -type d -exec chmod 0775 {} \; # Install cron echo "[*] Add jobs to crontab"