Mercurial Hosting > luan
changeset 2050:1f4c590bf0ae acme-tiny
explicitly specify nginx conf
| author | Violet7 |
|---|---|
| date | Tue, 11 Nov 2025 18:21:08 -0800 |
| parents | 26ef16b1f09c |
| children | 331c1853af25 |
| files | host/renewSsl.sh host/start.sh host/startup/nginx/nginx.conf.luan host/stop.sh host/stop_nginx.sh src/luan/host/https.luan |
| diffstat | 6 files changed, 7 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
diff -r 26ef16b1f09c -r 1f4c590bf0ae host/renewSsl.sh --- a/host/renewSsl.sh Tue Nov 11 17:36:06 2025 -0800 +++ b/host/renewSsl.sh Tue Nov 11 18:21:08 2025 -0800 @@ -45,5 +45,5 @@ } done -sudo /usr/local/bin/nginx -s reload +sudo /usr/local/bin/nginx -s reload -c "$(pwd)/local/nginx.conf" echo "Nginx reloaded."
diff -r 26ef16b1f09c -r 1f4c590bf0ae host/start.sh --- a/host/start.sh Tue Nov 11 17:36:06 2025 -0800 +++ b/host/start.sh Tue Nov 11 18:21:08 2025 -0800 @@ -10,6 +10,7 @@ touch started.lock; sudo $(which nginx) -c $(pwd)/local/nginx.conf; + if [ "$1" == "launchd" ]; then java -Xms1024M -classpath $CLASSPATH luan.Luan run_host.luan logs 1>logs/stdout.log 2>logs/stderr.log else
diff -r 26ef16b1f09c -r 1f4c590bf0ae host/startup/nginx/nginx.conf.luan --- a/host/startup/nginx/nginx.conf.luan Tue Nov 11 17:36:06 2025 -0800 +++ b/host/startup/nginx/nginx.conf.luan Tue Nov 11 18:21:08 2025 -0800 @@ -3,6 +3,7 @@ %> worker_processes 4; user <%=user%> <%=group%>; +pid <%=rootDir%>/local/nginx.pid events { worker_connections 4096;
diff -r 26ef16b1f09c -r 1f4c590bf0ae host/stop.sh --- a/host/stop.sh Tue Nov 11 17:36:06 2025 -0800 +++ b/host/stop.sh Tue Nov 11 18:21:08 2025 -0800 @@ -30,5 +30,5 @@ echo "no running app found"; fi; -sudo $(which nginx) -s stop; +sudo $(which nginx) -s stop -c $(pwd)/local/nginx.conf; exit 0;
diff -r 26ef16b1f09c -r 1f4c590bf0ae host/stop_nginx.sh --- a/host/stop_nginx.sh Tue Nov 11 17:36:06 2025 -0800 +++ b/host/stop_nginx.sh Tue Nov 11 18:21:08 2025 -0800 @@ -1,3 +1,3 @@ #!/bin/bash -sudo $(which nginx) -s stop; +sudo $(which nginx) -s stop -c "$(pwd)/local/nginx.conf";
diff -r 26ef16b1f09c -r 1f4c590bf0ae src/luan/host/https.luan --- a/src/luan/host/https.luan Tue Nov 11 17:36:06 2025 -0800 +++ b/src/luan/host/https.luan Tue Nov 11 18:21:08 2025 -0800 @@ -178,7 +178,8 @@ end if changed then local cmd = [[ -sudo $(which nginx) -t -c "]]..luanhost_dir..[[/local/nginx.conf" && sudo $(which nginx) -s reload; +sudo $(which nginx) -t -c "]]..luanhost_dir..[[/local/nginx.conf" && \ +sudo $(which nginx) -s reload -c "]]..luanhost_dir..[[/local/nginx.conf"; ]] local s = uri("bash:"..cmd).read_text() logger.info("reload_nginx "..s)
