feat(apache): Glob ueber VHost-Logs fuer Panel-Hoster (KeyHelp/Plesk/cPanel)
This commit is contained in:
1 parent
da3f221c8d
commit
02af5b428f
1 file changed
+11
+11
@@ -159,6 +159,17 @@ if [ "$HAS_APACHE" -eq 1 ] && [ -z "$APACHE_LOG" ]; then
|
||||
/var/log/apache2/other_vhosts_access.log /var/log/httpd/access.log; do
|
||||
[ -r "$_p" ] && { APACHE_LOG="$_p"; break; }
|
||||
done
|
||||
# Panel-Hoster (KeyHelp, Plesk, cPanel) legen PRO DOMAIN eigene Logs an.
|
||||
# Dann reicht der globale Pfad nicht — Glob deckt alle VHosts ab.
|
||||
if [ -z "$APACHE_LOG" ]; then
|
||||
for _d in /var/log/apache2 /var/log/httpd /home/*/logs /var/log/keyhelp; do
|
||||
[ -d "$_d" ] || continue
|
||||
if ls "$_d"/*access*.log "$_d"/access_log >/dev/null 2>&1; then
|
||||
APACHE_LOG="$_d/*access*.log"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ -z "$APACHE_LOG" ]; then
|
||||
# Aus der Config lesen (KeyHelp/Plesk setzen eigene Pfade)
|
||||
_cl="$(grep -rhoE '^\s*CustomLog\s+\S+' /etc/apache2/ /etc/httpd/ 2>/dev/null \
|
||||
|
||||
Reference in new issue
Block a user