ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzatz_5.4.0.1/51/admin/acshttpacc.htm

126 lines
5.7 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Configure access logging for internal Web server HTTP transport</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h4><a name="acshttpacc"></a>Configure access logging for internal Web server HTTP transport</h4>
<p>To log information about client HTTP requests, the internal Web server HTTP transport supports access logging. To configure access logging, add these custom properties to one of the HTTP transports in your Web container:</p>
<table cellspacing="2" cellpadding="2" border="1">
<tr>
<th id="col1" width="110">Property name</th>
<th id="col2" width="95">Valid Values</th>
<th id="col3" width="130">Description</th>
<th id="col4" width="210">Default</th>
<th id="col5" width="95">Scope</th>
</tr>
<tr>
<td headers="col1" width="110">AccessLogDisable</td>
<td headers="col2" width="95">true/false</td>
<td headers="col3" width="130">Enable or disable access logging</td>
<td headers="col4" width="210">true (logging disabled)</td>
<td headers="col5" width="95">Virtual/Global</td>
</tr>
<tr>
<td headers="col1" width="110">AccessLog</td>
<td headers="col2" width="95"><em>filename</em></td>
<td headers="col3" width="130">The location of the log file</td>
<td headers="col4" width="210">logs/<em>app_server</em>/http_access.log<sup>1</sup></td>
<td headers="col5" width="95">&nbsp;</td>
</tr>
</table>
<p><sup>1</sup> Relative paths are qualified from the root directory of your instance. For example, for the default application server in the default instance of WebSphere Application Server - Express, the default location for the log file is /QIBM/UserData/WebAS5/Base/default/logs/server1/http_access.log.</p>
<p>Access log entries should have this format:</p>
<pre><em>hostname</em> <em>user_agent</em> [<em>local_time</em> -<em>status_code</em>]
<em>thread_id</em> <em>http_request</em> <em>status_code</em> <em>bytecount</em></pre>
<p>where:</p>
<ul>
<li><em>hostname</em> is the name or IP address of the client</li>
<li><em>user_agent</em> is the type of application (for example, Internet Explorer or Netscape) that the client uses to connect to your application server</li>
<li><em>local_time</em> is the time that the server receives the request</li>
<li><em>status_code</em> is the status of the incoming request</li>
<li><em>thread_id</em> is the ID of the thread that processes the request</li>
<li><em>http_request</em> is the URL that the client requests</li>
<li><em>bytecount</em> is the number of bytes contained in the body of the request</li>
</ul>
<p><strong>Enable access logging</strong></p>
<p>To enable access logging, follow these steps:</p>
<ol>
<li><a href="acstart.htm">Start the administrative console</a>.</li>
<li>In the topology tree, expand <strong>Servers</strong> and click <strong>Application Servers</strong>.</li>
<li>Click the name of the application server for which you want to disable HTTP transport logging.</li>
<li>On the application server page, click <strong>Web Container</strong> under <strong>Additional Properties</strong>.</li>
<li>On the <strong>Web Container</strong> page, click <strong>HTTP Transports</strong>.</li>
<li>On the <strong>HTTP Transports</strong> page, select one of the HTTP transports.</li>
<li>On the transport page, click <strong>Custom Properties</strong>.</li>
<li>To enable error logging, add the AccessLogDisable custom property to one of the HTTP transports in your Web container and set the value to <strong>false</strong>:
<ol type="a">
<li>Click <strong>New</strong>.</li>
<li>For the property name, specify <tt>AccessLogDisable</tt>.</li>
<li>For the value, specify <tt>false</tt>.</li>
<li>Click <strong>OK</strong>.</li>
</ol></li>
<li>(Optional) Specify the AccessLog custom property:
<ol type="a">
<li>Click <strong>New</strong>.</li>
<li>For the property name, specify <tt>AccessLog</tt>.</li>
<li>For the value, specify a file name.</li>
<li>Click <strong>OK</strong>.</li>
</ol>
<p><strong>Note:</strong> If you plan to be use access logging for multiple HTTP transports on a single HTTP server, specify a unique name for each transport's access log file to avoid having data for one transport overwritten.</p></li>
<li><a href="acsave.htm">Save the configuration</a>.</li>
<li>Restart the application server.</li>
</ol>
<p><strong>Disable access logging</strong></p>
<p>To disable access logging, follow these steps:</p>
<ol>
<li><a href="acstart.htm">Start the administrative console</a>.</li>
<li>In the topology tree, expand <strong>Servers</strong> and click <strong>Application Servers</strong>.</li>
<li>Click the name of the application server for which you want to disable HTTP transport logging.</li>
<li>On the application server page, click <strong>Web Container</strong> under <strong>Additional Properties</strong>.</li>
<li>On the <strong>Web Container</strong> page, click <strong>HTTP Transports</strong>.</li>
<li>On the <strong>HTTP Transports</strong> page, click the transport that includes the AccessLogDisable property.</li>
<li>On the transport page, click <strong>Custom Properties</strong>.</li>
<li>Click the ErrorLogDisable custom property.</li>
<li>On the property page, specify a valu of <tt>true</tt> for the AccessLogDisable property.</li>
<li><a href="acsave.htm">Save the configuration</a>.</li>
<li>Restart the application server.</li>
</ol>
</body>
</html>