Jump to content

Log Files


Recommended Posts

I'm trying to setup a program called StatsNow which monitors web site usage but it needs to know the absolute path to the raw apache log files. Does anyone know

the path to where these files for my site are kept? I've looked through my root folder but all the log files I can find are for the awstats etc.

 

Thanks a lot :D

Link to comment
Share on other sites

Apache's logs should be in the following standard location for each domain: /usr/local/apache/domlogs/domain.name. For example, the log file for my main site is /usr/local/apache/domlogs/rayners.org. Log files for subdomains follow the same pattern.

 

You will only have enough access to read the log files. And please remember that direct access to the log files for your domain is not officially support as far as I am aware. You can, however, use CPanel's Raw Log Manager to archive apache's logs in your home directory each month, where running them through a statistics package should be relatively easy.

Link to comment
Share on other sites

  • 7 months later...
/usr/local/apache/domlogs/rayners.org.

 

You will only have enough access to read the log files.

I get the error:

 

Warning: file(/usr/local/apache/domlogs/****): failed to open stream: Permission denied in /home/wcl/public_html/bw.php on line 5

 

 

I'm just trying to open the file and read it ofcourse. I don't need/want to write to it.

 

Here is the PHP I am using..

 

<?

$a = file('/usr/local/apache/domlogs/wclmanagement.com');

echo $a;

?>

Link to comment
Share on other sites

You can access the logs via FTP

 

ftp://USERNAME_logs:PASSWORD@ftp.YOURDOMA.../YOURDOMAIN.TLD

 

I'm not familiar with StatsNow, but you could setup a cron job to run a PHP script that will download the logs from the FTP and save them in the same directory with your script. (Then you wouldn't even need an absolute path.)

 

I'm sure you'll figure out something if you determined enough. Just know that you can have access to your logs on demand. You just have to get a 'local copy' of them first.

 

I'm trying to setup a program called StatsNow which monitors web site usage but it needs to know the absolute path to the raw apache log files. Does anyone know the path to where these files for my site are kept? I've looked through my root folder but all the log files I can find are for the awstats etc.
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...