Mercurial Hosting > luan
changeset 2137:67b504ba388c nginx_decoupled
don't assume the user's primary group name is the same as their username
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 20:20:03 -0800 |
| parents | 3ca8f933209d |
| children | 5cf7c6b1dec9 |
| files | host/gen_nginx.sh host/nginx_common.sh host/startup/nginx/nginx_master.conf.luan |
| diffstat | 3 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
diff -r 3ca8f933209d -r 67b504ba388c host/gen_nginx.sh --- a/host/gen_nginx.sh Mon Jan 19 19:47:11 2026 -0800 +++ b/host/gen_nginx.sh Mon Jan 19 20:20:03 2026 -0800 @@ -14,7 +14,7 @@ LUANHOST_DIR="$(pwd)" cp startup/nginx/mime.types $NGINX_ROOT_CONFIG_DIR -luan startup/nginx/nginx_master.conf.luan $NGINX_ROOT_CONFIG_DIR $NGINX_SITE_CONFIGS_DIR $NGINX_LOG_DIR $NGINX_PID_DIR $NGINX_USER >$NGINX_ROOT_CONFIG_FILE +luan startup/nginx/nginx_master.conf.luan $NGINX_ROOT_CONFIG_DIR $NGINX_SITE_CONFIGS_DIR $NGINX_LOG_DIR $NGINX_PID_DIR $NGINX_USER $NGINX_GROUP >$NGINX_ROOT_CONFIG_FILE luan startup/nginx/nginx.conf.luan $LUANHOST_DIR >"$NGINX_SITE_CONFIGS_DIR/luanhost.conf" # DON'T put this in the auto-loaded configs dir (NGINX_SITE_CONFIGS_DIR),
diff -r 3ca8f933209d -r 67b504ba388c host/nginx_common.sh --- a/host/nginx_common.sh Mon Jan 19 19:47:11 2026 -0800 +++ b/host/nginx_common.sh Mon Jan 19 20:20:03 2026 -0800 @@ -7,6 +7,7 @@ export NGINX_LOG_DIR="$NGINX_ROOT_CONFIG_DIR/log" export NGINX_PID_DIR="$NGINX_ROOT_CONFIG_DIR" export NGINX_USER="$(whoami)" +export NGINX_GROUP"$(id -gn)" # -p makes this succeed if the path exists on macos # on linux, mkdir always suceeds if path exists
diff -r 3ca8f933209d -r 67b504ba388c host/startup/nginx/nginx_master.conf.luan --- a/host/startup/nginx/nginx_master.conf.luan Mon Jan 19 19:47:11 2026 -0800 +++ b/host/startup/nginx/nginx_master.conf.luan Mon Jan 19 20:20:03 2026 -0800 @@ -1,4 +1,4 @@ -local nginxRootConfigDir, nginxSiteConfigsDir, nginxLogDir, nginxPidDir, nginxUser = ... +local nginxRootConfigDir, nginxSiteConfigsDir, nginxLogDir, nginxPidDir, nginxUser, nginxGroup = ... %> @@ -6,7 +6,7 @@ # on an ubuntu (pop-os) linux machine. -user <%=nginxUser%> <%=nginxUser%>; +user <%=nginxUser%> <%=nginxGroup%>; worker_processes auto; pid <%=nginxPidDir%>/nginx.pid; error_log <%=nginxLogDir%>/error.log;
