Skip to main content

How are you accessing the log files? - Knowledgebase / FGX Web - Foregenix Customer Support

How are you accessing the log files?

Authors list

The Foregenix seal runs as a PHP script inside your web server, and is able to read any file your web server PHP process has access to. Several times per day, our portal tells the seal "fetch me the contents of this log file" and the seal opens the file, reads it, and sends the contents. This is the process in broad terms.

So the log files (and the directory containing them) must be readable by the user running your PHP scripts. If you are running Apache with mod_php, this user is typically the same as the user running Apache (this user could be called: apache, apache2, nobody etc). If you are running nginx (or Apache) with PHP-FPM, PHP runs as a separate user, typically called php-fpm.

What you could examine is the detailed permissions of the log file and of the directory containing them. Basically you should ensure that the directory /var/www/vhosts/sitesample.co.uk/logs is readable and executable by "others", and that the log files inside are readable by "others". Example of expected "ls -l" output with the important part emphasised in bold for the directory:

drwx---r-x. 2 root          root                4096 Oct 25 15:35 logs

and for a log file:

-rw-r--r--. 1 root root   3027 Sep 14 09:55 access_log