wiki:web_server_logs

Version 8 (modified by Benjamin Melançon, 7 years ago) (diff)

--

How can I get access to the logs for my web site?

The May First/People Link web servers store logs that show who accessed each web site and when. You can see the logs for any web site from your organization by looking in the filesystem on your primary server. For example, if the member organization named foo has a web site named example.org, the logs for that web site can be found at:

/home/members/foo/sites/example.org/logs/

In that directory, the file named web.log is the most recent log, web.log.1 is from the previous full week, and web.log.2.gz, web.log.3.gz, etc. are compressed logs from previous weeks. (This is the Apache access log.)

In addition, you will see error.log, which has the same naming convention. The web.log files are "access" logs - meaning they have a line for every item on your web site that was requested. error.log shows errors that were encountered.

These logs, written to by the Apache web server that runs your site, and will include any PHP errors and notices caused by your site. This is useful for diagnosing errors in the functioning of your site and checking for potential problems indicated by notices. In short, read Apache logs for PHP errors.

Turn On web logging

If you don't see any files called error.log, you will need to add the following line to your Web Config in the Members Control Panel. Replace MEMBER-NAME with your member name and DOMAIN-NAME with your domain name:

ErrorLog /home/members/MEMBER-NAME/sites/DOMAIN-NAME/logs/error.log

Turn Off web logging

Alternatively, you may want to turn off all logging.

Other possibilities

Note that as of 2008, there was some discussion about alternate ways to set up logs. If you're interested in seeing changes in the way web server logging works at MF/PL, please comment on #302, or open a new ticket with your suggestions. Your feedback is always welcome!