249 lines
14 KiB
HTML
249 lines
14 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="topic" />
|
||
|
<meta name="DC.Title" content="Set up logs on HTTP Server (powered by Apache)" />
|
||
|
<meta name="abstract" content="This topic provides information about how to set up logs to record events and other information for your HTTP Server with the IBM Web Administration for i5/OS interface." />
|
||
|
<meta name="description" content="This topic provides information about how to set up logs to record events and other information for your HTTP Server with the IBM Web Administration for i5/OS interface." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzaieparlogs.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2002,2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2002,2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzaieconfiglogs" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Set up logs on HTTP Server (powered by Apache)</title>
|
||
|
</head>
|
||
|
<body id="rzaieconfiglogs"><a name="rzaieconfiglogs"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Set up logs on HTTP Server (powered by Apache)</h1>
|
||
|
<div><p>This topic provides information about how to set up logs to record
|
||
|
events and other information for your HTTP Server with the <span>IBM<sup>®</sup> Web Administration for i5/OS™ interface</span>.</p>
|
||
|
<div class="important"><span class="importanttitle">Important:</span> Information
|
||
|
for this topic supports the latest PTF levels for HTTP Server for i5/OS .
|
||
|
It is recommended that you install the latest PTFs to upgrade to the latest
|
||
|
level of the HTTP Server for i5/OS. Some of the topics documented here are
|
||
|
not available prior to this update. See <a href="http://www-03.ibm.com/servers/eserver/iseries/software/http/services/service.html" target="_blank">http://www.ibm.com/servers/eserver/iseries/software/http/services/service.htm</a> <img src="www.gif" alt="Link outside Information Center" /> for more information. </div>
|
||
|
<p>Your HTTP Server (powered by Apache) can generate a record of events commonly
|
||
|
referred to as a Log. Logs can contain error messages, information on what
|
||
|
is being accessed on your HTTP Server (powered by Apache), who is accessing
|
||
|
your HTTP Server (powered by Apache), script logs, and FRCA logs.</p>
|
||
|
<p>The following topics discuss <a href="#rzaieconfiglogs_general">general
|
||
|
log settings</a> required for all logs, <a href="#rzaieconfiglogs_access">Access
|
||
|
logs</a>, <a href="#rzaieconfiglogs_error">Error logs</a>, <a href="#rzaieconfiglogs_script">Script logs</a>, <a href="#rzaieconfiglogs_frca">FRCA
|
||
|
logs</a>, where to find the <a href="#joblog">HTTP Server job log</a>,
|
||
|
and how to <a href="#trace">run a trace</a>. </p>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzaieparlogs.htm" title="This topic provides step-by-step tasks for log and log file tasks.">Log and log file tasks</a></div>
|
||
|
</div>
|
||
|
</div><div class="hr" id="rzaieconfiglogs_general"><a name="rzaieconfiglogs_general"><!-- --></a><h2 class="topictitle2">General log settings</h2>
|
||
|
<div><p>Before creating a specific log type, the general settings for all logs
|
||
|
must be applied to your HTTP Server (powered by Apache) configuration. To
|
||
|
configure the general settings for all logs, do the following:</p>
|
||
|
<ol><li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <a href="rzaiecontext.htm">context</a> you
|
||
|
want to work with from the <strong>Server area</strong> list. </li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>Logging</strong>. </li>
|
||
|
<li>Click the <strong>General Settings</strong> tab in the form. <p>The General Settings
|
||
|
allow you to specify log entry time (local or Greenwich Mean Time), the log
|
||
|
cycle, and maximum log file size.</p>
|
||
|
</li>
|
||
|
<li>Click <strong>Apply</strong>.</li>
|
||
|
</ol>
|
||
|
<p>After you complete the general settings for all logs, you can specify what
|
||
|
type of logs you want to create.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="rzaieconfiglogs_access"><a name="rzaieconfiglogs_access"><!-- --></a><h2 class="topictitle2">Access Logs</h2>
|
||
|
<div><p>Access logs contain a record of requests to the HTTP Server (powered by
|
||
|
Apache). The access log itself can be configured to record specific information
|
||
|
that you will want to review later. To configure an access log, do the following:</p>
|
||
|
<ol><li>See <a href="#rzaieconfiglogs_general">General log settings</a>.
|
||
|
</li>
|
||
|
<li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <a href="rzaiecontext.htm">context</a> you
|
||
|
want to work with from the <strong>Server area</strong> list. </li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>Logging</strong>. </li>
|
||
|
<li>Click the <strong>Custom Log</strong> tab in the form. <p>You can specify various
|
||
|
types of information that can be logged in the Access log by specifying a
|
||
|
customized log format. For more information how to specify a customized log
|
||
|
format see Log Format.</p>
|
||
|
</li>
|
||
|
<li>Click <strong>Apply</strong>. </li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="rzaieconfiglogs_error"><a name="rzaieconfiglogs_error"><!-- --></a><h2 class="topictitle2">Error Logs</h2>
|
||
|
<div><p>Error Logs contain records of errors that are encountered by visitors to
|
||
|
the server. You can specify what types of errors that are logged. To configure
|
||
|
error logs, do the following: </p>
|
||
|
<ol><li>See <a href="#rzaieconfiglogs_general">General log settings</a>.
|
||
|
</li>
|
||
|
<li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <a href="rzaiecontext.htm">context</a> you
|
||
|
want to work with from the <strong>Server area</strong> list. </li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>Logging</strong>. </li>
|
||
|
<li>Click the <strong>Error Logs</strong> tab in the form.<p>You must first enable error
|
||
|
logging to edit what errors will be logged. Once enabled, do the following:</p>
|
||
|
</li>
|
||
|
<li>Enter the path and name of the error log. </li>
|
||
|
<li>Enter an expiration date. </li>
|
||
|
<li>The value defines how long the error log will be maintained before information
|
||
|
is rolled over. </li>
|
||
|
<li>Enter a maximum cumulative size. <p>The value defines how large your error
|
||
|
log can be before old log entries are deleted.</p>
|
||
|
</li>
|
||
|
<li>Select logging level. <p>From the <strong>Logging level</strong> list, select the
|
||
|
level of information you want entered in the error log.</p>
|
||
|
</li>
|
||
|
<li>Click <strong>Apply</strong>. </li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="rzaieconfiglogs_script"><a name="rzaieconfiglogs_script"><!-- --></a><h2 class="topictitle2">Script Logs</h2>
|
||
|
<div><p>Script Logs contain errors generated by CGI programs running on the server.
|
||
|
Generally you should only enable these logs when you are debugging programs
|
||
|
on the server. To configure script logs, do the following: </p>
|
||
|
<div class="note"><span class="notetitle">Note:</span> Set up a script log only if you are running CGI programs. </div>
|
||
|
<ol><li>See <a href="#rzaieconfiglogs_general">General log settings</a>.
|
||
|
</li>
|
||
|
<li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <a href="rzaiecontext.htm">context</a> you
|
||
|
want to work with from the <strong>Server area</strong> list. </li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>Logging</strong>. </li>
|
||
|
<li>Click the <strong>Script Logs</strong> tab in the form.<p>You must first enable
|
||
|
script logging to edit what script errors will be logged. Once enabled, do
|
||
|
the following:</p>
|
||
|
</li>
|
||
|
<li>Enter the path and name of the script error log. </li>
|
||
|
<li>Enter a maximum log file size. <p>The value defines the size of the script
|
||
|
error log.</p>
|
||
|
</li>
|
||
|
<li>Enter a maximum log entry size. <p>The value defines the size of the script
|
||
|
error log entry.</p>
|
||
|
</li>
|
||
|
<li>Click <strong>Apply</strong>. </li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="rzaieconfiglogs_frca"><a name="rzaieconfiglogs_frca"><!-- --></a><h2 class="topictitle2">FRCA Logs</h2>
|
||
|
<div><p><a href="rzaieconfrca.htm">Fast Response Cache Accelerator
|
||
|
( FRCA)</a> is an extension to the HTTP Server (powered by Apache) that
|
||
|
enables caching and serving of data in Licensed Internal Code. </p>
|
||
|
<ol><li>See <a href="#rzaieconfiglogs_general">General log settings</a>.
|
||
|
</li>
|
||
|
<li>Click the <strong>Manage</strong> tab. </li>
|
||
|
<li>Click the <span class="uicontrol">HTTP Servers</span> subtab.</li>
|
||
|
<li>Select your HTTP Server (powered by Apache) from the <strong>Server</strong> list.
|
||
|
</li>
|
||
|
<li>Select the <a href="rzaiecontext.htm">context</a> you
|
||
|
want to work with from the <strong>Server area</strong> list. </li>
|
||
|
<li>Expand <strong>Server Properties</strong>. </li>
|
||
|
<li>Click <strong>Logging</strong>. </li>
|
||
|
<li>Click the <strong>FRCA Logs</strong> tab in the form. <p>FRCA must be enabled before
|
||
|
information is written to the FRCA log. Once enabled, do the following: </p>
|
||
|
</li>
|
||
|
<li>Click <strong>Add</strong> under the <strong>FRCA logs</strong> table. </li>
|
||
|
<li>Enter the path and name of the FRCA log. </li>
|
||
|
<li>Enter the log format. <div class="note"><span class="notetitle">Note:</span> For more information how to specify a customized
|
||
|
log format see <a href="rzaielogformat.htm">Log formats for HTTP Server (powered by Apache)</a>. </div>
|
||
|
</li>
|
||
|
<li>Enter the environment variable conditions. </li>
|
||
|
<li>Enter an expiration date. <p>The value defines how long the FRCA log will
|
||
|
be maintained before information is rolled over. </p>
|
||
|
</li>
|
||
|
<li>Enter the maximum cumulative size of the FRCA log file. <p>The value defines
|
||
|
how large your FRCA log can be before old log entries are deleted.</p>
|
||
|
</li>
|
||
|
<li>Click <strong>Continue</strong>. </li>
|
||
|
<li>Click <strong>Apply</strong>. </li>
|
||
|
</ol>
|
||
|
<p>For information on ASF Tomcat logs, see <a href="rzaietomcat.htm">About Tomcat</a>.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="joblog"><a name="joblog"><!-- --></a><h2 class="topictitle2">HTTP server job logs</h2>
|
||
|
<div><p>The HTTP Server job logs contain messages or exceptions. The HTTP Server
|
||
|
(powered by Apache) job log is maintained in the QHTTPSVR subsystem, listed
|
||
|
with a job name matching the name of your HTTP Server instance.</p>
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="hr" id="trace"><a name="trace"><!-- --></a><h2 class="topictitle2">Run a trace </h2>
|
||
|
<div><p id="trace__introtrace"><a name="trace__introtrace"><!-- --></a>The HTTP Server (powered by Apache) trace allows you to
|
||
|
view various levels of trace information related to a specific server. You
|
||
|
will need to have a 5250 session on the iSeries™ your HTTP Server is currently
|
||
|
running on. </p>
|
||
|
<ol><li>Start a 5250 session. </li>
|
||
|
<li>Start the server with a parameter of the STRTCPSVR command. Use the following: <ul><li>-ve (error) for a trace that contains records for all error return codes
|
||
|
or exception conditions. </li>
|
||
|
<li>-vi (information) for a trace that contains -ve level trace records as
|
||
|
well as trace records for entry and exit points from application level API's
|
||
|
and API parameters. </li>
|
||
|
<li> -vv (verbose) for a trace that contains -vi level trace records as well
|
||
|
as trace records for debugging control flow or data corruption. </li>
|
||
|
</ul>
|
||
|
<p>For example <tt>STRTCPSVR *HTTP HTTPSVR(JKLSERVER '-vv')</tt>. </p>
|
||
|
</li>
|
||
|
<li>There are three ways to get output from the trace: <ul><li><tt>ENDTCPSVR</tt> - When the server is ended the trace data is placed
|
||
|
into a spool file. There is a spool file for each job that is running on the
|
||
|
server. If a server ends abnormally, trace data is placed into spool files
|
||
|
even if tracing is not active at the time of the error. </li>
|
||
|
<li><tt>DMPUSRTRC</tt> - This command dumps the trace data for a specific
|
||
|
job to the display or to a physical file member in the <tt>QTEMP</tt> library.
|
||
|
For example: <ol type="a"><li>Use the <tt>WRKACTJOB</tt> command to find the server job number. For
|
||
|
example WRKACTJOB SBS(QHTTPSVR). </li>
|
||
|
<li>Dump the user trace to a file in QTEMP. For example <tt>DMPUSRTRC JOB(nnnnnn/QTMHHTTP/MYSERVER)</tt>,
|
||
|
where <tt>nnnnnn</tt> is the job number and <tt>MYSERVER</tt> is the server.
|
||
|
</li>
|
||
|
<li>Use the <tt>DSPPFM</tt> command to view the contents of the trace. For
|
||
|
example <tt>DSPPFM QTEMP/QAP0ZDMP MBR(QP0Znnnnnn)</tt>. </li>
|
||
|
</ol>
|
||
|
</li>
|
||
|
<li><tt>TRCTCPAPP</tt> - You can use the <tt>TRCTCPAPP</tt> command to initiate
|
||
|
a trace after the server is started and to end a trace. To use the <tt>TRCTCPAPP</tt> command,
|
||
|
the server must have been started with the STRTCPSVR command.<div class="note"><span class="notetitle">Note:</span> If you
|
||
|
started the trace with the <tt>STRTCPSVR</tt> and one of the trace startup
|
||
|
parameters (-ve, -vi, or -vv), then you must do the following to end the trace: </div>
|
||
|
<ol type="a"><li>Enter the <tt>TRCTCPAPP SET (*ON)</tt> command to synchronize it with
|
||
|
the <tt>STRTCPSVR</tt> command. For example: <tt>TRCTCPAPP APP(HTTP) SET(*ON)
|
||
|
HTTPSVR(JKLSERVER) TRCLVL(*VERBOSE)</tt>. </li>
|
||
|
<li>Enter the <tt>TRCTCPAPP SET (*OFF)</tt> command. For example: <tt>TRCTCPAPP
|
||
|
APP(*HTTP) SET (*OFF) TITLE('My title')</tt>. </li>
|
||
|
</ol>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
</body>
|
||
|
</html>
|