Mercurial Hosting > luan
comparison host/nginx_common.sh @ 2136:3ca8f933209d nginx_decoupled
Initial; use ~/.nginx-luan/ as nginx master conf dir instead of trying to detect the system default.
| author | Violet7 |
|---|---|
| date | Mon, 19 Jan 2026 19:47:11 -0800 |
| parents | |
| children | 67b504ba388c |
comparison
equal
deleted
inserted
replaced
| 2135:e94d10d071e4 | 2136:3ca8f933209d |
|---|---|
| 1 #!/bin/bash | |
| 2 set -e | |
| 3 | |
| 4 export NGINX_ROOT_CONFIG_DIR="$HOME/.nginx-luan" | |
| 5 export NGINX_ROOT_CONFIG_FILE="$NGINX_ROOT_CONFIG_DIR/nginx.conf" | |
| 6 export NGINX_SITE_CONFIGS_DIR="$NGINX_ROOT_CONFIG_DIR/sites" | |
| 7 export NGINX_LOG_DIR="$NGINX_ROOT_CONFIG_DIR/log" | |
| 8 export NGINX_PID_DIR="$NGINX_ROOT_CONFIG_DIR" | |
| 9 export NGINX_USER="$(whoami)" | |
| 10 | |
| 11 # -p makes this succeed if the path exists on macos | |
| 12 # on linux, mkdir always suceeds if path exists | |
| 13 mkdir -p $NGINX_ROOT_CONFIG_DIR | |
| 14 mkdir -p $NGINX_SITE_CONFIGS_DIR | |
| 15 mkdir -p $NGINX_LOG_DIR | |
| 16 mkdir -p $NGINX_PID_DIR |
