mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-08-03 16:03:38 +00:00
added option to disable http
This commit is contained in:
@@ -1,9 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if (if [ "$PHP81" = true ]; then cgi-fcgi -bind -connect /dev/php81.sock > /dev/null 2>&1; fi && if [ "$PHP82" = true ]; then cgi-fcgi -bind -connect /dev/php82.sock > /dev/null 2>&1; fi && [ "$(curl -sk https://127.0.0.1:81/api/ | jq --raw-output .status)" = "OK" ]); then
|
||||
echo "OK"
|
||||
exit 0
|
||||
else
|
||||
echo "NOT OK"
|
||||
exit 1
|
||||
fi
|
22
rootfs/bin/healthcheck.sh
Executable file
22
rootfs/bin/healthcheck.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
export HC_IP="localhost"
|
||||
|
||||
if [ "$NPM_LISTEN_LOCALHOST" = "true" ]; then
|
||||
export NPM_IPV4_BINDING="127.0.0.1"
|
||||
export NPM_IPV6_BINDING="[::1]"
|
||||
fi
|
||||
|
||||
if [ -n "$NPM_IPV6_BINDING" ]; then
|
||||
export HC_IP="$NPM_IPV6_BINDING"
|
||||
elif [ -n "$NPM_IPV4_BINDING" ]; then
|
||||
export HC_IP="$NPM_IPV4_BINDING"
|
||||
fi
|
||||
|
||||
if (if [ "$PHP81" = true ]; then cgi-fcgi -bind -connect /dev/php81.sock > /dev/null 2>&1; fi && if [ "$PHP82" = true ]; then cgi-fcgi -bind -connect /dev/php82.sock > /dev/null 2>&1; fi && [ "$(curl -sk https://"$HC_IP":81/api/ | jq --raw-output .status)" = "OK" ]); then
|
||||
echo "OK"
|
||||
exit 0
|
||||
else
|
||||
echo "NOT OK"
|
||||
exit 1
|
||||
fi
|
@@ -495,6 +495,16 @@ else
|
||||
sed -i "s/#\?listen \[\([0-9a-f:]\+\)\]:\(bep\)/listen \[::\]:$NPM_PORT/g" /usr/local/nginx/conf/conf.d/npm-no-server-name.conf
|
||||
fi
|
||||
|
||||
if [ "$DISABLE_HTTP" = "true" ]; then
|
||||
find /data/nginx -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|#\1|g" {} \;
|
||||
find /app/templates -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|#\1|g" {} \;
|
||||
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|#\1|g" {} \;
|
||||
else
|
||||
find /data/nginx -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|\1|g" {} \;
|
||||
find /app/templates -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|\1|g" {} \;
|
||||
find /usr/local/nginx/conf/conf.d -type f -name '*.conf' -exec sed -i "s|#\?\(listen.*80\)|\1|g" {} \;
|
||||
fi
|
||||
|
||||
if [ "$NGINX_LOG_NOT_FOUND" = "true" ]; then
|
||||
sed -i "s|log_not_found off;|log_not_found on;|g" /usr/local/nginx/conf/nginx.conf
|
||||
fi
|
||||
|
Reference in New Issue
Block a user