diff --git a/Dockerfile b/Dockerfile index bc20ef3..e40c72f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ ENV PHP_SOCK=/var/run/php/php${PHP_VERSION}-fpm.sock ENV PHP_LOG_SYSOUT=true # http-over-all part -ARG RELEASE="1.2.0-19" +ARG RELEASE="1.2.0-19p01" ARG SSL_COUNTRY=DE ARG SSL_STATE=Berlin diff --git a/example-doclig.env b/example-doclig.env index dee0e93..9ff1c5e 100644 --- a/example-doclig.env +++ b/example-doclig.env @@ -1,10 +1,10 @@ TINY_INSTANCE=true CRYPT_KEY=ps7UDnEXq1cmrMzCvNYE5okXK6B4HlckOQWFQCbJ/Nk= -PERIODIC_JOB_INTERVAL=1 +PERIODIC_JOB_INTERVAL=15 FORCE_UPDATE_LOCK=20 PROXY_MAX_SIZE=600m PROXY_INACTIVE=1h -HTTP_SERVER_START=light +HTTP_SERVER_START=true CONNECTED_URLS= #CONNECTED_URLS=http://127.0.0.1/func/show-proxy-headers #CONNECTED_URLS=http://172.16.3.22:8338/func/show-headers,http://172.16.3.22:8338/force-update,http://172.16.3.22:8338/force-update @@ -15,19 +15,22 @@ CONNECTED_URLS= #LOCAL_1_DAV_AUTH=1thorsten:webdav #LOCAL_1_DAV_IP_RESTRICTION="allow all;" #LOCAL_1_DAV_METHODS="PUT DELETE MKCOL COPY MOVE" -#LOCAL_1_DAV_LOG_ACCESS=/dev/stdout +#LOCAL_1_DAV_LOG_ACCESS=/var/log/nginx/local.access +#LOCAL_1_DAV_LOG_ERROR=/var/log/nginx/local.error #LOCAL_1_HTTP=true #LOCAL_1_CACHE=false #LOCAL_1_HTTP_IP_RESTRICTION="allow all;" #LOCAL_1_HTTP_LOG_ACCESS=/dev/stdout +#LOCAL_1_HTTP_LOG_ERROR=/dev/stdout #------------------- -#GIT_1_REPO_URL=https://github.com/1thorsten/timeset.git -#GIT_1_REPO_BRANCH=master -#GIT_1_NAME=git_timeset -#GIT_1_DAV=true -#GIT_1_DAV_AUTH=1thorsten:webdav -#GIT_1_DAV_METHODS=COPY -#GIT_1_SEPARATE_GIT_DIR=true +GIT_1_REPO_URL=https://github.com/1thorsten/timeset.git +#GIT_1_REPO_URL=http://127.0.0.1/1thorsten/timeset.git +GIT_1_REPO_BRANCH=master +GIT_1_NAME=git_timeset +GIT_1_DAV=true +GIT_1_DAV_AUTH=1thorsten:webdav +GIT_1_DAV_METHODS=COPY +GIT_1_SEPARATE_GIT_DIR=true #------------------- #GIT_2_REPO_URL=https://github.com/1thorsten/http-over-all.git #GIT_2_REPO_BRANCH=main @@ -36,13 +39,13 @@ CONNECTED_URLS= #GIT_2_STOP_ON_ERROR=true #GIT_2_PERMITTED_RESOURCES=common/sds_permitted_resources.txt #------------------- -DOCKER_1_IMAGE=1thorsten/ewake -DOCKER_1_TAG=latest +#DOCKER_1_IMAGE=1thorsten/ewake +#DOCKER_1_TAG=latest #DOCKER_1_SRC_DIRS=/etc,/bin #DOCKER_1_EXCL=bin/hostname,*yp* -DOCKER_1_NAME=docker_ewake -DOCKER_1_DIGEST_PATH=/remote/docker/1 -DOCKER_1_SYNC_ALWAYS=true +#DOCKER_1_NAME=docker_ewake +#DOCKER_1_DIGEST_PATH=/remote/docker/1 +#DOCKER_1_SYNC_ALWAYS=true diff --git a/incontainer/connect-services.sh b/incontainer/connect-services.sh index 72c4af1..e4ccf2d 100644 --- a/incontainer/connect-services.sh +++ b/incontainer/connect-services.sh @@ -464,7 +464,7 @@ function connect_or_update_git_repos() { echo "git repo is currently not accessible -> backup" ACCESSIBLE=false elif [[ "${git_output}" == *"Could not resolve host"* ]]; then - echo "git repo is currently not accessible -> host could not resolved" + echo "git repo is currently not accessible -> host could not be resolved" ACCESSIBLE=false elif [[ "${git_output}" == *"unable to update"* ]]; then echo "git repo is currently not accessible -> unable to update" diff --git a/incontainer/php/highlight.php b/incontainer/php/highlight.php index 9dcff5f..ebd34e2 100644 --- a/incontainer/php/highlight.php +++ b/incontainer/php/highlight.php @@ -16,7 +16,7 @@ $uri = $_REQUEST['uri']; $remote_addr = $_REQUEST['remote_addr']; -$log = PHP_LOG_ENABLED; +$log = (PHP_LOG_ENABLED === "true"); $debugOut = ''; if (isset($_SERVER['HTTP_X_DEBUG_OUT'])) { $log = true; diff --git a/incontainer/php/include/UptoDate.php b/incontainer/php/include/UptoDate.php index 1dec1bf..79c38a0 100644 --- a/incontainer/php/include/UptoDate.php +++ b/incontainer/php/include/UptoDate.php @@ -16,7 +16,7 @@ class UptoDate const INTERNAL = "http://127.0.0.1/internal"; const CACHED_INTERNAL = "http://127.0.0.1/cached_internal"; const CACHE_PATH = "/nginx-cache/"; - private $log = PHP_LOG_ENABLED; + private bool $log = (PHP_LOG_ENABLED === "true"); public string $path; public ?string $lastHttpStatus = null; public ?string $cacheStatus = null; @@ -88,7 +88,6 @@ public function isCacheInvalid(): bool // $path = path from Webserve (/ibe_and_more/java/security/README.txt) public function getCacheStatus(): string { - if (substr($this->path, -1) === '/') { return $this->cacheStatus = "CACHE_NO"; } @@ -99,7 +98,6 @@ public function getCacheStatus(): string } $header_direct = $this->header(self::INTERNAL . $this->path); - if ($header_cache['Last-Modified'] == $header_direct['Last-Modified']) { return $this->cacheStatus = "CACHE_HIT"; } @@ -127,8 +125,8 @@ public function cleanUpCache(): bool LOG::write(get_called_class(), "cleanUpCache: file does not exists -> $file"); continue; } - $cacheKey = $this->readCacheKeyFromFile($file); + $cacheKey = $this->readCacheKeyFromFile($file); if (substr($cacheKey, -$len) === $this->path) { LOG::write(get_called_class(), "cleanUpCache: delete old cached resource -> $file"); unlink($file); @@ -160,6 +158,5 @@ public function readCacheKeyFromFile($filename): string $contents = $file->current(); } while ($file->eof() || !strstr($contents, "KEY:")); return substr($contents, 0, -1); - } } diff --git a/incontainer/php/latest-highlight.php b/incontainer/php/latest-highlight.php index bec76c0..808a404 100644 --- a/incontainer/php/latest-highlight.php +++ b/incontainer/php/latest-highlight.php @@ -27,7 +27,7 @@ exit(); } -$log = PHP_LOG_ENABLED; +$log = (PHP_LOG_ENABLED === "true"); $debugOut = ''; if (isset($_SERVER['HTTP_X_DEBUG_OUT'])) { $log = true; diff --git a/incontainer/php/latest.php b/incontainer/php/latest.php index d9682da..0a78db5 100644 --- a/incontainer/php/latest.php +++ b/incontainer/php/latest.php @@ -29,7 +29,7 @@ exit(); } -$log = false; +$log = (PHP_LOG_ENABLED === "true"); $debugOut = ''; if (isset($_SERVER['HTTP_X_DEBUG_OUT'])) { $log = true;