diff --git a/include/functions b/include/functions index 89626958..b96bb070 100644 --- a/include/functions +++ b/include/functions @@ -2181,8 +2181,9 @@ if [ ! "${VALUE}" = "" ]; then # If multiple values follow, select first one VALUE=$(echo ${VALUE} | awk '{ print $1 }') - if [ ! -f ${VALUE} ]; then - LogText "Result: could not find referenced log file ${VALUE} in nginx configuration" + # Find both, log files provided with full or relative path + if [ ! -f ${VALUE} -a ! -f "${CONFIG_FILE%nginx.conf}${VALUE}" ]; then + LogText "Result: could not find log file ${VALUE} referenced in nginx configuration" NGINX_ACCESS_LOG_MISSING=1 fi fi @@ -2218,7 +2219,8 @@ # Check if log file exists FILE=$(echo ${VALUE} | awk '{ print $1 }') if [ ! "${FILE}" = "" ]; then - if [ ! -f ${FILE} ]; then + # Find both, log files provided with full or relative path + if [ ! -f ${FILE} -a ! -f "${CONFIG_FILE%nginx.conf}${FILE}" ]; then NGINX_ERROR_LOG_MISSING=1 fi else