Where can I find error log files?

后端 未结 8 564
Happy的楠姐
Happy的楠姐 2020-12-05 00:27

Where can I find error log files? I need to check them for solving an internal server error shown after installing suPHP.

8条回答
  •  广开言路
    2020-12-05 00:53

    You can use "lsof" to find open logfiles on your system. lsof just gives you a list of all open files.

    Use grep for "log" ... use grep again for "php" (if the filename contains the strings "log" and "php" like in "php_error_log" and you are root user you will find the files without knowing the configuration).

            root@lnx-work:~# lsof |grep log
            ... snip
            gmain     12148 12274       user   13r      REG              252,1    32768     661814 /home/user/.local/share/gvfs-metadata/home-11ab0393.log
            gmain     12148 12274       user   21r      REG              252,1    32768     662622 /home/user/.local/share/gvfs-metadata/root-56222fe2.log
            gvfs-udis 12246             user  mem       REG              252,1    55384     790567 /lib/x86_64-linux-gnu/libsystemd-login.so.0.7.1
    ==> apache 12333             user  mem       REG              252,1    55384     790367 /var/log/http/php_error_log**
            ... snip 
    

            root@lnx-work:~# lsof |grep log |grep php 
            **apache 12333             user  mem       REG              252,1    55384     790367 /var/log/http/php_error_log**
            ... snip 
    

    Also see this article on finding open logfiles: Find open logfiles on a linux system

提交回复
热议问题