Website's log files (error and access) are not created under certain circumstances

Discussion in 'Installation/Configuration' started by cbj4074, May 7, 2014.

  1. cbj4074

    cbj4074 Member


    I've noticed this once before, but it just happened again, and I can't figure out exactly what causes the behavior.

    Oftentimes, I create a "staging site" before I take a website live to the public. Once everything is just the way I want it, I edit the Website in ISPConfig and simply change the domain name that is associated with the website. This works very well for me.

    However, some small percentage of the time, I have noticed that the symbolic links that point to the website's log files are not created in /var/www/

    Might anyone know how this could happen, given the workflow I describe?

    And what's the best way to "fix" this? Just create the symlinks manually whenever this happens? Is there any drawback to that approach that may not be obvious?

    I'm on ISPConfig

    Thanks for any help!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The logs are mounted with a bind mount, they are not symlinked. there was a issue with the renaming of the bind mounts that has been fixed in svn stable a few days ago, if i remember correctly.

    To correct the issue manually, check if the bind mount in /etc/fstab is correct, if not, correct it there and run "mount -a" to apply it.
  3. cbj4074

    cbj4074 Member

    Great, thanks for the quick reply, Till.

    I don't want to fiddle with it in the middle of a work-day, but if that's all that is required to fix the issue, I should be all set.
  4. cbj4074

    cbj4074 Member

    I'm finally getting around to examining this issue in more detail.

    The entry in /etc/fstab looks to be correct:

    /var/log/ispconfig/httpd/ /var/www/clients/client14/web39/log    none    bind,nobootwait    0 0
    If I attempt to mount the bind-mount, here's what happens:

    # mount /var/log/ispconfig/httpd/
    mount: No such file or directory
    Naturally, the result is similar for mount -a (clearly, all other mounts are good-to-go, but this one complains):

    # mount -a
    mount: No such file or directory
    Here are the results of df (excluding all normal/working entries):

    # df
    df: ` (deleted)/var/www/clients/client14/web39/log': No such file or directory
    Here are the directory contents for that directory:

    # ls -lah /var/log/ispconfig/httpd/
    total 47M
    drwxr-xr-x  2 root     root 4.0K May 22 00:00 .
    drwxr-xr-x 21 root     root 4.0K May 16 23:46 ..
    -rw-r--r--  1 root     root 1.6M May  2 23:49 20140502-access.log
    -rw-r--r--  1 www-data root 632K May  3 23:55 20140503-access.log
    -rw-r--r--  1 www-data root 547K May  4 23:59 20140504-access.log
    -rw-r--r--  1 www-data root 4.6M May  5 23:59 20140505-access.log
    -rw-r--r--  1 www-data root 2.1M May  6 23:56 20140506-access.log
    -rw-r--r--  1 www-data root 1.3M May  7 23:59 20140507-access.log
    -rw-r--r--  1 www-data root 2.2M May  8 23:59 20140508-access.log
    -rw-r--r--  1 www-data root 2.1M May  9 23:59 20140509-access.log
    -rw-r--r--  1 www-data root 317K May 10 23:57 20140510-access.log
    -rw-r--r--  1 www-data root 455K May 11 23:58 20140511-access.log
    -rw-r--r--  1 www-data root 2.7M May 13 00:00 20140512-access.log
    -rw-r--r--  1 www-data root 3.0M May 13 23:55 20140513-access.log
    -rw-r--r--  1 www-data root 2.9M May 14 23:57 20140514-access.log
    -rw-r--r--  1 www-data root 2.0M May 15 23:59 20140515-access.log
    -rw-r--r--  1 www-data root 2.4M May 16 23:59 20140516-access.log
    -rw-r--r--  1 www-data root 910K May 17 23:58 20140517-access.log
    -rw-r--r--  1 www-data root 629K May 18 23:59 20140518-access.log
    -rw-r--r--  1 www-data root 3.1M May 19 23:56 20140519-access.log
    -rw-r--r--  1 www-data root 3.1M May 20 23:58 20140520-access.log
    -rw-r--r--  1 www-data root 2.9M May 21 23:59 20140521-access.log
    -rw-r--r--  1 www-data root 3.2M May 22 20:08 access.log
    -rw-r--r--  1 www-data root 4.7M May 22 20:08 error.log
    Hmm. Okay, very well, the files are there.

    What about the files in /var/www/clients/client14/web39/log?

    # ls -lah /var/www/clients/client14/web39/log
    total 0
    For other "working" sites on this server, both directories that appear in the /etc/fstab entry return the same contents, which is, of course, the expected result.

    All right, I finally figured this out. I just had to umount and remount the bind-mount:

    # umount /var/www/clients/client14/web39/log
    # mount /var/www/clients/client14/web39/log
    Is this the same bug that you addressed (per your previous post in this thread)?

    Thanks for pointing me in the right direction here!

Share This Page