Apache logs missing after a domain change

Discussion in 'General' started by ColonelPhoenix, Jun 3, 2025.

  1. ColonelPhoenix

    ColonelPhoenix New Member

    Hi,

    I noticed a problem on two different ISPConfig hosts I manage : the Apache access logs are missing from the /var/www/mydomain.com/log folder after a main domain change on a website. Error logs are still there though, ls -lah gives me the following :

    Code:
    root@myhost:/var/www/mydomain.com/log# ls -lah
    total 48K
    drwxr-xr-x  2 root root 4.0K Jun  3 00:01 .
    drwxr-xr-x 17 root root 4.0K Mar 25 14:10 ..
    lrwxrwxrwx  1 root root   19 Mar 25 10:26 access.log -> 20250325-access.log
    -rw-r--r--  1 root root    0 Jun  3 00:01 error.log
    -rw-r--r--  1 root root   30 Jun  3 00:01 error.log.1.gz
    -rw-r--r--  1 root root   30 May 25 00:01 error.log.10.gz
    -rw-r--r--  1 root root   30 Jun  2 00:01 error.log.2.gz
    -rw-r--r--  1 root root   30 Jun  1 00:01 error.log.3.gz
    -rw-r--r--  1 root root   30 May 31 00:01 error.log.4.gz
    -rw-r--r--  1 root root   30 May 30 00:01 error.log.5.gz
    -rw-r--r--  1 root root   30 May 29 00:01 error.log.6.gz
    -rw-r--r--  1 root root   30 May 28 00:01 error.log.7.gz
    -rw-r--r--  1 root root   30 May 27 00:01 error.log.8.gz
    -rw-r--r--  1 root root   30 May 26 00:01 error.log.9.gz
    lrwxrwxrwx  1 root root   53 Mar 25 00:01 yesterday-access.log -> /var/www/clients/client1/web1/log/20250324-access.log
    
    March 25 is the day the main domain got changed.
    If go to ISPConfig httpd log folder (/var/log/ispconfig/httpd) I can find 3 folders :
    - 127.0.0.1
    - mydomain.com
    - myolddomain.com

    mydomain.com is full with daily access logs since march 25 (non rotationed) and a single error log, myolddomain.com contains the files from the /var/www/mydomain.com/log folder.

    My guess is something didn't synchronize correctly when we changed the main domain from myolddomain.com to mydomain.com from the ISPConfig interface, it's not the first time I see this : is there any way to fix this ?
     
  2. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    the logfiles are bind mounted in /etc/fstab

    changing the domain of a website would change the bind mount in /etc/fstab, to make it active you would have to run
    'mount -a' or reboot the server
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Normally ISPConfig should do the mount change on its own, but maybe there is something broken.
     

Share This Page