PHP not saving logs

Discussion in 'Installation/Configuration' started by ic32k, Dec 20, 2023.

  1. ic32k

    ic32k New Member

    Hello,

    A customer contacted to check a error and found his installation is not logging events, after searching found this error in all the vhosts:

    Action aborted, file is a symlink: /var/log/ispconfig/httpd/*/error.log

    As far I know ispconfig can't have symlinks and in the fstab there is many links to that folders:

    /var/log/ispconfig/httpd/*.com /home/www/clients/client313/web506/log none bind,nobootwait 0 0
    /var/log/ispconfig/httpd/*0.com /home/www/clients/client323/web507/log none bind,nobootwait 0 0
    /var/log/ispconfig/httpd/*tores.es /home/www/clients/client304/web513/log none bind,nobootwait 0 0
    [...snip....]
    /var/log/ispconfig/httpd/s*nes.es /home/www/clients/client325/web515/log none bind,nobootwait 0 0
    /var/log/ispconfig/httpd/ni*web.es /home/www/clients/client1/web518/log none bind,nobootwait 0 0
    /var/log/ispconfig/httpd/u*trol.es /home/www/clients/client1/web519/log none bind,nobootwait 0 0
    /var/log/ispconfig/httpd/it*nes.es /home/www/clients/client1/web521/log none bind,nobootwait 0 0
    /var/log/ispconfig/httpd/u*web.es /home/www/clients/client326/web523/log none bind,nobootwait 0 0


    But mount only shows few mount points:

    root@/var/log# mount -l
    /dev/md2 on / type ext4 (rw,relatime)
    /dev/md3 on /home type ext4 (rw,relatime)
    /proc/ on /proc type proc (rw,relatime)
    /sys/ on /sys type sysfs (rw,relatime)
    devtmpfs on /dev type devtmpfs (rw,relatime,size=32894932k,nr_inodes=8223733,mode=755)
    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
    tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
    /dev/md3 on /home/www/clients/client326/web523/log type ext4 (rw,relatime)
    root@/var/log#

    How can I fix this?

    Thank you alll
     
  2. michelangelo

    michelangelo Active Member

    Are you running Apache or Nginx as a web server and what is missing, the access logs?
    Symlinks are used for the log files, so the statement ISPConfig can't have symlinks is wrong.

    In case of Apache make sure that the vlogger process is running.
    If it is not, restart the apache webserver.

    edit
    Just to make clear, symlinks are used for log files in /var/www/*/logs/<logfile>
    However, as Till said, there are mountpoints missing which are the reason why it is not working.
    Checking the vlogger stuff I mentioned would be one thing to consider if the other issue(s) is fixed and it is still not working.
     
    Last edited: Dec 20, 2023
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The log path on an ISPConfig server never contains any symlinks. if you have a symlink in that path, then its not from ISPConfig, you must created it manually.

    The /etc/fstab file on Linux does not contain any symlinks. It contains mountpoints and ISPConfig uses bind-mounts for log folders. Bind-mounts are not symlinks.

    If these are all lines in /etc/fstab, then this server has either no websites or you removed the bind mount lines for the sites from that file. Amd likely you replaced them manually with a symlink, and that#s whyt the web server (not ISPConfig) complains about. You must restore the original fstab file with the bind mount lines inside and remove the symlink that you seem to have created.
     
  4. ic32k

    ic32k New Member

    Hello,

    The server has more than 150 domains and over 100 webpages working, the '*' char in the logs was there for privacy.

    @michelangelo thakns for your answer, loging is working as far as if I setup manually a different destination for the logs in one of the webs, there is no problem with that...

    @till i think you missundestood what i'm saying, or maybe I dind't explained myself very well...

    I posted the fstab to show that the bind mount points created by ISPConfig are in place and the full output of mount to show that in fact something is wrong as there is only one of the bind mounts in place. Nobody created symlinks manually

    After reloading the fstab running "mount -a" all the 'symlink errors' the logs started working without problems and the symlink errors stopped being registered. I think ISPConfig was recording symlink error maybe because can't access the log directory, as was not mounted

    How can I check why fstab wasn't executed to prevent this from happening again
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Examine output of command dmesg.
    Examine /var/log/syslog.
    Examine /var/log/kern.log, may have some info.
     

Share This Page