Where are the access_log and error_log files for my server?
Overview
Your log files are accessible from the 'logs' directory of your (gs) Grid-Service. The system path for this is /home/00000/logs/, which can be accessed through the File Manager, FTP, or SSH. You can also view them from within your (gs) Grid-Service Control Panel. Be sure to replace 00000 with your (gs) site number.
Access & Enabling
To find this feature in the (gs) Grid-Service Control Panel, we've created this short walk-through.
1. Log into your AccountCenter and navigate to the Admin section for your (gs) Grid-Service. You will see the Report Settings & Logs section on the page. Navigate to that section:

2. On this page, you can fine-tune your preferences on how you would like your log files treated. Please note that if you need to check error logs, they must be first enabled. Error logs are disabled by default and must be turned on from within this section before they can be viewed:

Viewing the logs
The log data is best viewed in a plain text editor. Example text from an access_log:
123.45.678.90 - - [11/Oct/2010:02:58:13 -0700] "GET /s00000.gridserver.com/ HTTP/1.0" 200 2869 "http://s00000.gridserver.com/" "Malware-Scanner/0.5 (+security@mediatemple.net)"
Overview
All connections to the Web server and requests for files that were not found on the server are registered in log files. These log files are analyzed by the statistical utilities running on the server, which then present graphical reports on demand. You may want to download these log files to your computer for processing by third-party statistical utilities, or view their contents for web server debugging purposes.
Instructions
-
Log into the Plesk Control Panel for your domain. See Figure 1:

Figure 1: The Plesk Control Panel. Click for a larger view.TIP:
If the screenshots you see here don't match your version of Plesk, please see the (dv) Dedicated-Virtual Server 3.5 section.
These screenshots are for the (dv) Dedicated-Virtual Server 4.0 and Plesk 11. If you are on a (dv) 4.0 and are running Plesk 10.x, please see this article for upgrade information: How do I upgrade Plesk?
-
From the Home page, click on Websites & Domains. See Figure 2:

Figure 2: Click on the "Websites & Domains" tab. - Click on Show Advanced Operations.
- Select Logs.
- Click on the [View] link to the right of your domain.
- Click on the log you'd like to view. This will open in a pop-up window or new tab, depending on your browser preferences. Be sure your browser's pop-up blocker is disabled for your Plesk Control Panel.
Viewing the logs
The log data is best viewed in a plain text editor. Example text from an error_log:
[Fri Aug 19 15:06:01 2011] [error] [client 119.63.196.90] File does not exist: /var/www/vhosts/dv4.mt-example.com/dv-example.com/robots.txt
Overview
All connections to the Web server and requests for files that were not found on the server are registered in log files. These log files are analyzed by the statistical utilities running on the server, which then present graphical reports on demand. You may want to download these log files to your computer for processing by third-party statistical utilities, or view their contents for web server debugging purposes.
End of Life Warning
This service has a pending End of Life. Please move to a current service as soon as possible. For more information, please see: (dv) Dedicated-Virtual 4.0: Migration Information.
Instructions
There are two ways you can check your error_log and access_logs on the (dv) Dedicated-Virtual Server 3.5.
In Plesk
- Log into Plesk.
- Click on your domain.
-
Click on Log Manager, see Figure 1.

Figure 1. -
Click on either the error_log or the relevant access_log, see Figure 2:

Figure 2. - A new window will open containing your log, that you can now search with your browser (try CTRL-F for a quick search).
Using SSH
- Log into your server with a root or sudo user via SSH.
-
Navigate to your logs directory (replace example.com with your own domain name):
cd /var/www/vhosts/example.com/statistics/logs/ -
You can use the following commands to search through the error_log:
For example, let's say that you're looking for errors on foo.php. You can run a search like this:
grep "foo.php" error_logNotes on this command:
- Replace the text in between the quotes with whatever you'd like to search.
- If you want to search all your access logs instead, replace error_log with access_log*.
-
Sample error log output:
[Mon Apr 05 11:33:01 2010] [error] [client 72.10.62.12] PHP Notice: Undefined variable: host in /var/www/vhosts/example.com/httpdocs/foo.php on line 23, referer: http://example.com/Interpreting your output:
A standard error message will contain the following pieces of information:
- The date and time at which the error occurred.
- The severity: this is usually either error, fatal, or warning.
- The IP address of the computer or server that requested the page.
- The specific error that Apache produced or was given (in the example above, a PHP Notice).
- The requested file.
- Sometimes there is additional information (such as the referrer, in the above example, which indicates the page that originally requested the file that gave the error).
-
Sample access log output:
72.10.62.197 - - [16/Sep/2010:10:38:04 -0700] "GET /foo.php?=PHPE9568F35-D428-11d2-A769-00AA001ACF42 HTTP/1.1" 200 2324 "http://example.com/foo.php" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9"Interpreting your output:
A standard access log entry will contain the following pieces of information:
- The IP address of the computer or server that requested the page.
- The date and time of the request. The -0700 in the example shows the time zone (Pacific Time).
- The type of request. GET and POST are the most common.
- The data or file requested or sent.
- Success of the request. 200 indicates success.
- Number of bytes transmitted.
- Referrer for the page. If the page was visited directly, this shows browser information.
-
You can also view your logs live. This is useful for troubleshooting errors as they occur and for tracking your server's response as you navigate through your web pages. Use tail -f to view each new line of the log as it is written. The first example is for the error_log:
tail -f error_logHere is the example for the access_log:
tail -f access_logThe -f flag tells tail to "follow" the file. Otherwise, tail will just show the 10 most recent lines of the file. Press CTRL-C to stop following the file.
- You can also provide the full path to the file when you first log into SSH, without first using the cd command. Example for searching your access logs:
grep "16/Sep/2010" /var/www/vhosts/example.com/statistics/logs/access_log*
- For all HTTP responses (like 301, 404, etc.), please see w3.org.