1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3 4<html xmlns="http://www.w3.org/1999/xhtml"> 5 <head> 6 <meta name="generator" content="HTML Tidy, see www.w3.org" /> 7 8 <title>Log Files - Apache HTTP Server</title> 9 </head> 10 <!-- Background white, links blue (unvisited), navy (visited), red (active) --> 11 12 <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" 13 vlink="#000080" alink="#FF0000"> 14 <div align="CENTER"> 15 <img src="images/sub.gif" alt="[APACHE DOCUMENTATION]" /> 16 17 <h3>Apache HTTP Server</h3> 18 </div> 19 20 21 22 <h1 align="center">Log Files</h1> 23 24 <p>In order to effectively manage a web server, it is necessary 25 to get feedback about the activity and performance of the 26 server as well as any problems that may be occuring. The Apache 27 HTTP Server provides very comprehensive and flexible logging 28 capabilities. This document describes how to configure its 29 logging capabilities, and how to understand what the logs 30 contain.</p> 31 32 <ul> 33 <li><a href="#security">Security Warning</a></li> 34 35 <li><a href="#errorlog">Error Log</a></li> 36 37 <li> 38 <a href="#accesslog">Access Log</a> 39 40 <ul> 41 <li><a href="#common">Common Log Format</a></li> 42 43 <li><a href="#combined">Combined Log Format</a></li> 44 45 <li><a href="#multiple">Multiple Access Logs</a></li> 46 47 <li><a href="#conditional">Conditional Logging</a></li> 48 </ul> 49 </li> 50 51 <li><a href="#rotation">Log Rotation</a></li> 52 53 <li><a href="#piped">Piped Logs</a></li> 54 55 <li><a href="#virtualhosts">Virtual Hosts</a></li> 56 57 <li> 58 <a href="#other">Other Log Files</a> 59 60 <ul> 61 <li><a href="#pidfile">PID File</a></li> 62 63 <li><a href="#scriptlog">Script Log</a></li> 64 65 <li><a href="#rewritelog">Rewrite Log</a></li> 66 </ul> 67 </li> 68 </ul> 69 <hr /> 70 71 <h2><a id="security" name="security">Security Warning</a></h2> 72 73 <p>Anyone who can write to the directory where Apache is 74 writing a log file can almost certainly gain access to the uid 75 that the server is started as, which is normally root. Do 76 <em>NOT</em> give people write access to the directory the logs 77 are stored in without being aware of the consequences; see the 78 <a href="misc/security_tips.html">security tips</a> document 79 for details.</p> 80 81 <p>In addition, log files may contain information supplied 82 directly by the client, without escaping. Therefore, it is 83 possible for malicious clients to insert control-characters in 84 the log files, so care must be taken in dealing with raw 85 logs.</p> 86 <hr /> 87 88 <h2><a id="errorlog" name="errorlog">Error Log</a></h2> 89 90 <table border="1"> 91 <tr> 92 <td valign="top"><strong>Related Directives</strong><br /> 93 <br /> 94 <a href="mod/core.html#errorlog">ErrorLog</a><br /> 95 <a href="mod/core.html#loglevel">LogLevel</a> </td> 96 </tr> 97 </table> 98 99 <p>The server error log, whose name and location is set by the 100 <a href="mod/core.html#errorlog">ErrorLog</a> directive, is the 101 most important log file. This is the place where Apache httpd 102 will send diagnostic information and record any errors that it 103 encounters in processing requests. It is the first place to 104 look when a problem occurs with starting the server or with the 105 operation of the server, since it will often contain details of 106 what went wrong and how to fix it.</p> 107 108 <p>The error log is usually written to a file (typically 109 <code>error_log</code> on unix systems and 110 <code>error.log</code> on Windows and OS/2). On unix systems it 111 is also possible to have the server send errors to 112 <code>syslog</code> or <a href="#piped">pipe them to a 113 program</a>.</p> 114 115 <p>The format of the error log is relatively free-form and 116 descriptive. But there is certain information that is contained 117 in most error log entries. For example, here is a typical 118 message.</p> 119 120 <blockquote> 121 <code>[Wed Oct 11 14:32:52 2000] [error] [client 127.0.0.1] 122 client denied by server configuration: 123 /export/home/live/ap/htdocs/test</code> 124 </blockquote> 125 126 <p>The first item in the log entry is the date and time of the 127 message. The second entry lists the severity of the error being 128 reported. The <a href="mod/core.html#loglevel">LogLevel</a> 129 directive is used to control the types of errors that are sent 130 to the error log by restricting the severity level. The third 131 entry gives the IP address of the client that generated the 132 error. Beyond that is the message itself, which in this case 133 indicates that the server has been configured to deny the 134 client access. The server reports the file-system path (as 135 opposed to the web path) of the requested document.</p> 136 137 <p>A very wide variety of different messages can appear in the 138 error log. Most look similar to the example above. The error 139 log will also contain debugging output from CGI scripts. Any 140 information written to <code>stderr</code> by a CGI script will 141 be copied directly to the error log.</p> 142 143 <p>It is not possible to customize the error log by adding or 144 removing information. However, error log entries dealing with 145 particular requests have corresponding entries in the <a 146 href="#accesslog">access log</a>. For example, the above example 147 entry corresponds to an access log entry with status code 403. 148 Since it is possible to customize the access log, you can 149 obtain more information about error conditions using that log 150 file.</p> 151 152 <p>During testing, it is often useful to continuously monitor 153 the error log for any problems. On unix systems, you can 154 accomplish this using:</p> 155 156 <blockquote> 157 <code>tail -f error_log</code> 158 </blockquote> 159 <hr /> 160 161 <h2><a id="accesslog" name="accesslog">Access Log</a></h2> 162 163 <table border="1"> 164 <tr> 165 <td valign="top"><strong>Related Modules</strong><br /> 166 <br /> 167 <a href="mod/mod_log_config.html">mod_log_config</a><br /> 168 </td> 169 170 <td valign="top"><strong>Related Directives</strong><br /> 171 <br /> 172 <a 173 href="mod/mod_log_config.html#customlog">CustomLog</a><br /> 174 <a 175 href="mod/mod_log_config.html#logformat">LogFormat</a><br /> 176 <a href="mod/mod_setenvif.html#setenvif">SetEnvIf</a> 177 </td> 178 </tr> 179 </table> 180 181 <p>The server access log records all requests processed by the 182 server. The location and content of the access log are 183 controlled by the <a 184 href="mod/mod_log_config.html#customlog">CustomLog</a> 185 directive. The <a 186 href="mod/mod_log_config.html#logformat">LogFormat</a> 187 directive can be used to simplify the selection of the contents 188 of the logs. This section describes how to configure the server 189 to record information in the access log.</p> 190 191 <p>Of course, storing the information in the access log is only 192 the start of log management. The next step is to analyze this 193 information to produce useful statistics. Log analysis in 194 general is beyond the scope of this document, and not really 195 part of the job of the web server itself. For more information 196 about this topic, and for applications which perform log 197 analysis, check the <a 198 href="http://dmoz.org/Computers/Software/Internet/Site_Management/Log_Analysis/"> 199 Open Directory</a> or <a 200 href="http://dir.yahoo.com/Computers_and_Internet/Software/Internet/World_Wide_Web/Servers/Log_Analysis_Tools/"> 201 Yahoo</a>.</p> 202 203 <p>Various versions of Apache httpd have used other modules and 204 directives to control access logging, including 205 mod_log_referer, mod_log_agent, and the 206 <code>TransferLog</code> directive. The <code>CustomLog</code> 207 directive now subsumes the functionality of all the older 208 directives.</p> 209 210 <p>The format of the access log is highly configurable. The 211 format is specified using a <a 212 href="mod/mod_log_config.html#formats">format string</a> that 213 looks much like a C-style printf(1) format string. Some 214 examples are presented in the next sections. For a complete 215 list of the possible contents of the format string, see the <a 216 href="mod/mod_log_config.html">mod_log_config 217 documentation</a>.</p> 218 219 <h3><a id="common" name="common">Common Log Format</a></h3> 220 221 <p>A typical configuration for the access log might look as 222 follows.</p> 223 224 <blockquote> 225 <code>LogFormat "%h %l %u %t \"%r\" %>s %b" common<br /> 226 CustomLog logs/access_log common</code> 227 </blockquote> 228 229 <p>This defines the <em>nickname</em> <code>common</code> and 230 associates it with a particular log format string. The format 231 string consists of percent directives, each of which tell the 232 server to log a particular piece of information. Literal 233 characters may also be placed in the format string and will be 234 copied directly into the log output. The quote character 235 (<code>"</code>) must be escaped by placing a back-slash before 236 it to prevent it from being interpreted as the end of the 237 format string. The format string may also contain the special 238 control characters "<code>\n</code>" for new-line and 239 "<code>\t</code>" for tab.</p> 240 241 <p>The <code>CustomLog</code> directive sets up a new log file 242 using the defined <em>nickname</em>. The filename for the 243 access log is relative to the <a 244 href="mod/core.html#serverroot">ServerRoot</a> unless it begins 245 with a slash.</p> 246 247 <p>The above configuration will write log entries in a format 248 known as the Common Log Format (CLF). This standard format can 249 be produced by many different web servers and read by many log 250 analysis programs. The log file entries produced in CLF will 251 look something like this:</p> 252 253 <blockquote> 254 <code>127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET 255 /xxx_pb.gif HTTP/1.0" 200 2326</code> 256 </blockquote> 257 258 <p>Each part of this log entry is described below.</p> 259 260 <dl> 261 <dt><code>127.0.0.1</code> (<code>%h</code>)</dt> 262 263 <dd>This is the IP address of the client (remote host) which 264 made the request to the server. If <a 265 href="mod/core.html#hostnamelookups">HostnameLookups</a> is 266 set to <code>On</code>, then the server will try to determine 267 the hostname and log it in place of the IP address. However, 268 this configuration is not recommended since it can 269 significantly slow the server. Instead, it is best to use a 270 log post-processor such as <a 271 href="programs/logresolve.html">logresolve</a> to determine 272 the hostnames. The IP address reported here is not 273 necessarily the address of the machine at which the user is 274 sitting. If a proxy server exists between the user and the 275 server, this address will be the address of the proxy, rather 276 than the originating machine.</dd> 277 278 <dt><code>-</code> (<code>%l</code>)</dt> 279 280 <dd>The "hyphen" in the output indicates that the requested 281 piece of information is not available. In this case, the 282 information that is not available is the RFC 1413 identity of 283 the client determined by <code>identd</code> on the clients 284 machine. This information is highly unreliable and should 285 almost never be used except on tightly controlled internal 286 networks. Apache httpd will not even attempt to determine 287 this information unless <a 288 href="mod/core.html#identitycheck">IdentityCheck</a> is set 289 to <code>On</code>.</dd> 290 291 <dt><code>frank</code> (<code>%u</code>)</dt> 292 293 <dd>This is the userid of the person requesting the document 294 as determined by HTTP authentication. The same value is 295 typically provided to CGI scripts in the 296 <code>REMOTE_USER</code> environment variable. If the status 297 code for the request (see below) is 401, then this value 298 should not be trusted because the user is not yet 299 authenticated. If the document is not password protected, 300 this entry will be "<code>-</code>" just like the previous 301 one.</dd> 302 303 <dt><code>[10/Oct/2000:13:55:36 -0700]</code> 304 (<code>%t</code>)</dt> 305 306 <dd> 307 The time that the server finished processing the request. 308 The format is: 309 310 <blockquote> 311 <code>[day/month/year:hour:minute:second zone]<br /> 312 day = 2*digit<br /> 313 month = 3*letter<br /> 314 year = 4*digit<br /> 315 hour = 2*digit<br /> 316 minute = 2*digit<br /> 317 second = 2*digit<br /> 318 zone = (`+' | `-') 4*digit</code> 319 </blockquote> 320 It is possible to have the time displayed in another format 321 by specifying <code>%{format}t</code> in the log format 322 string, where <code>format</code> is as in 323 <code>strftime(3)</code> from the C standard library. 324 </dd> 325 326 <dt><code>"GET /xxx_pb.gif HTTP/1.0"</code> 327 (<code>\"%r\"</code>)</dt> 328 329 <dd>The request line from the client is given in double 330 quotes. The request line contains a great deal of useful 331 information. First, the method used by the client is 332 <code>GET</code>. Second, the client requested the resource 333 <code>/xxx_pb.gif</code>, and third, the client used the 334 protocol <code>HTTP/1.0</code>. It is also possible to log 335 one or more parts of the request line independently. For 336 example, the format string "<code>%m %U%q %H</code>" will log 337 the method, path, query-string, and protocol, resulting in 338 exactly the same output as "<code>%r</code>".</dd> 339 340 <dt><code>200</code> (<code>%>s</code>)</dt> 341 342 <dd>This is the status code that the server sends back to the 343 client. This information is very valuable, because it reveals 344 whether the request resulted in a successful response (codes 345 beginning in 2), a redirection (codes beginning in 3), an 346 error caused by the client (codes beginning in 4), or an 347 error in the server (codes beginning in 5). The full list of 348 possible status codes can be found in the <a 349 href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP 350 specification</a> (RFC2616 section 10).</dd> 351 352 <dt><code>2326</code> (<code>%b</code>)</dt> 353 354 <dd>The last entry indicates the size of the object returned 355 to the client, not including the response headers. If no 356 content was returned to the client, this value will be 357 "<code>-</code>". To log "<code>0</code>" for no content, use 358 <code>%B</code> instead.</dd> 359 </dl> 360 361 <h4><a id="combined" name="combined">Combined Log 362 Format</a></h4> 363 364 <p>Another commonly used format string is called the Combined 365 Log Format. It can be used as follows.</p> 366 367 <blockquote> 368 <code>LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" 369 \"%{User-agent}i\"" combined<br /> 370 CustomLog log/acces_log combined</code> 371 </blockquote> 372 373 <p>This format is exactly the same as the Common Log Format, 374 with the addition of two more fields. Each of the additional 375 fields uses the percent-directive 376 <code>%{<em>header</em>}i</code>, where <em>header</em> can be 377 any HTTP request header. The access log under this format will 378 look like:</p> 379 380 <blockquote> 381 <code>127.0.0.1 - frank [10/Oct/2000:13:55:36 -0700] "GET 382 /xxx_pb.gif HTTP/1.0" 200 2326 383 "http://www.example.com/start.html" "Mozilla/4.08 [en] 384 (Win98; I ;Nav)"</code> 385 </blockquote> 386 387 <p>The additional fields are:</p> 388 389 <dl> 390 <dt><code>"http://www.example.com/start.html"</code> 391 (<code>\"%{Referer}i\"</code>)</dt> 392 393 <dd>The "Referer" (sic) HTTP request header. This gives the 394 site that the client reports having been referred from. (This 395 should be the page that links to or includes 396 <code>/xxx_pb.gif</code>).</dd> 397 398 <dt><code>"Mozilla/4.08 [en] (Win98; I ;Nav)"</code> 399 (<code>\"%{User-agent}i\"</code>)</dt> 400 401 <dd>The User-Agent HTTP request header. This is the 402 identifying information that the client browser reports about 403 itself.</dd> 404 </dl> 405 406 <h3><a id="multiple" name="multiple">Multiple Access 407 Logs</a></h3> 408 409 <p>Multiple access logs can be created simply by specifying 410 multiple <code>CustomLog</code> directives in the configuration 411 file. For example, the following directives will create three 412 access logs. The first contains the basic CLF information, 413 while the second and third contain referer and browser 414 information. The last two <code>CustomLog</code> lines show how 415 to mimic the effects of the <code>ReferLog</code> and 416 <code>AgentLog</code> directives.</p> 417 418 <blockquote> 419 <code>LogFormat "%h %l %u %t \"%r\" %>s %b" common<br /> 420 CustomLog logs/access_log common<br /> 421 CustomLog logs/referer_log "%{Referer}i -> %U"<br /> 422 CustomLog logs/agent_log "%{User-agent}i"</code> 423 </blockquote> 424 425 <p>This example also shows that it is not necessary to define a 426 nickname with the <code>LogFormat</code> directive. Instead, 427 the log format can be specified directly in the 428 <code>CustomLog</code> directive.</p> 429 430 <h3><a id="conditional" name="conditional">Conditional 431 Logging</a></h3> 432 433 <p>There are times when it is convenient to exclude certain 434 entries from the access logs based on characteristics of the 435 client request. This is easily accomplished with the help of <a 436 href="env.html">environment variables</a>. First, an 437 environment variable must be set to indicate that the request 438 meets certain conditions. This is usually accomplished with <a 439 href="mod/mod_setenvif.html#setenvif">SetEnvIf</a>. Then the 440 <code>env=</code> clause of the <code>CustomLog</code> 441 directive is used to include or exclude requests where the 442 environment variable is set. Some examples:</p> 443 444 <blockquote> 445 <code># Mark requests from the loop-back interface<br /> 446 SetEnvIf Remote_Addr "127\.0\.0\.1" dontlog<br /> 447 # Mark requests for the robots.txt file<br /> 448 SetEnvIf Request_URI "^/robots\.txt$" dontlog<br /> 449 # Log what remains<br /> 450 CustomLog logs/access_log common env=!dontlog</code> 451 </blockquote> 452 453 <p>As another example, consider logging requests from 454 english-speakers to one log file, and non-english speakers to a 455 different log file.</p> 456 457 <blockquote> 458 <code>SetEnvIf Accept-Language "en" english<br /> 459 CustomLog logs/english_log common env=english<br /> 460 CustomLog logs/non_english_log common env=!english</code> 461 </blockquote> 462 463 <p>Although we have just shown that conditional logging is very 464 powerful and flexibly, it is not the only way to control the 465 contents of the logs. Log files are more useful when they 466 contain a complete record of server activity. It is often 467 easier to simply post-process the log files to remove requests 468 that you do not want to consider.</p> 469 <hr /> 470 471 <h2><a id="rotation" name="rotation">Log Rotation</a></h2> 472 473 <p>On even a moderately busy server, the quantity of 474 information stored in the log files is very large. The access 475 log file typically grows 1 MB or more per 10,000 requests. It 476 will consequently be necessary to periodically rotate the log 477 files by moving or deleting the existing logs. This cannot be 478 done while the server is running, because Apache will continue 479 writing to the old log file as long as it holds the file open. 480 Instead, the server must be <a 481 href="stopping.html">restarted</a> after the log files are 482 moved or deleted so that it will open new log files.</p> 483 484 <p>By using a <em>graceful</em> restart, the server can be 485 instructed to open new log files without losing any existing or 486 pending connections from clients. However, in order to 487 accomplish this, the server must continue to write to the old 488 log files while it finishes serving old requests. It is 489 therefore necessary to wait for some time after the restart 490 before doing any processing on the log files. A typical 491 scenario that simply rotates the logs and compresses the old 492 logs to save space is:</p> 493 494 <blockquote> 495 <code>mv access_log access_log.old<br /> 496 mv error_log error_log.old<br /> 497 apachectl graceful<br /> 498 sleep 600<br /> 499 gzip access_log.old error_log.old</code> 500 </blockquote> 501 502 <p>Another way to perform log rotation is using <a 503 href="#piped">piped logs</a> as discussed in the next 504 section.</p> 505 <hr /> 506 507 <h2><a id="piped" name="piped">Piped Logs</a></h2> 508 509 <p>Apache httpd is capable of writing error and access log 510 files through a pipe to another process, rather than directly 511 to a file. This capability dramatically increases the 512 flexibility of logging, without adding code to the main server. 513 In order to write logs to a pipe, simply replace the filename 514 with the pipe character "<code>|</code>", followed by the name 515 of the executable which should accept log entries on its 516 standard input. Apache will start the piped-log process when 517 the server starts, and will restart it if it crashes while the 518 server is running. (This last feature is why we can refer to 519 this technique as "reliable piped logging".)</p> 520 521 <p>Piped log processes are spawned by the parent Apache httpd 522 process, and inherit the userid of that process. This means 523 that piped log programs usually run as root. It is therefore 524 very important to keep the programs simple and secure.</p> 525 526 <p>One important use of piped logs is to allow log rotation 527 without having to restart the server. The Apache HTTP Server 528 includes a simple program called <a 529 href="programs/rotatelogs.html">rotatelogs</a> for this 530 purpose. For example, to rotate the logs every 24 hours, you 531 can use:</p> 532 533 <blockquote> 534 <code>CustomLog "|/usr/local/apache/bin/rotatelogs 535 /var/log/access_log 86400" common</code> 536 </blockquote> 537 538 <p>A similar, but much more flexible log rotation program 539 called <a href="http://www.cronolog.org/">cronolog</a> 540 is available at an external site.</p> 541 542 <p>As with conditional logging, piped logs are a very powerful 543 tool, but they should not be used where a simpler solution like 544 off-line post-processing is available.</p> 545 <hr /> 546 547 <h2><a id="virtualhosts" name="virtualhosts">Virtual 548 Hosts</a></h2> 549 550 <p>When running a server with many <a href="vhosts/">virtual 551 hosts</a>, there are several options for dealing with log 552 files. First, it is possible to use logs exactly as in a 553 single-host server. Simply by placing the logging directives 554 outside the <code><VirtualHost></code> sections in the 555 main server context, it is possible to log all requests in the 556 same access log and error log. This technique does not allow 557 for easy collection of statistics on individual virtual 558 hosts.</p> 559 560 <p>If <code>CustomLog</code> or <code>ErrorLog</code> 561 directives are placed inside a <code><VirtualHost></code> 562 section, all requests or errors for that virtual host will be 563 logged only to the specified file. Any virtual host which does 564 not have logging directives will still have its requests sent 565 to the main server logs. This technique is very useful for a 566 small number of virtual hosts, but if the number of hosts is 567 very large, it can be complicated to manage. In addition, it 568 can often create problems with <a 569 href="vhosts/fd-limits.html">insufficient file 570 descriptors</a>.</p> 571 572 <p>For the access log, there is a very good compromise. By 573 adding information on the virtual host to the log format 574 string, it is possible to log all hosts to the same log, and 575 later split the log into individual files. For example, 576 consider the following directives.</p> 577 578 <blockquote> 579 <code>LogFormat "%v %l %u %t \"%r\" %>s %b" 580 comonvhost<br /> 581 CustomLog logs/access_log comonvhost</code> 582 </blockquote> 583 584 <p>The <code>%v</code> is used to log the name of the virtual 585 host that is serving the request. Then a program like <a 586 href="programs/other.html">split-logfile</a> can be used to 587 post-process the access log in order to split it into one file 588 per virtual host.</p> 589 590 <p>Unfortunately, no similar technique is available for the 591 error log, so you must choose between mixing all virtual hosts 592 in the same error log and using one error log per virtual 593 host.</p> 594 <hr /> 595 596 <h2><a id="other" name="other">Other Log Files</a></h2> 597 598 <table border="1"> 599 <tr> 600 <td valign="top"><strong>Related Modules</strong><br /> 601 <br /> 602 <a href="mod/mod_cgi.html">mod_cgi</a><br /> 603 <a href="mod/mod_rewrite.html">mod_rewrite</a> </td> 604 605 <td valign="top"><strong>Related Directives</strong><br /> 606 <br /> 607 <a href="mod/core.html#pidfile">PidFile</a><br /> 608 <a 609 href="mod/mod_rewrite.html#RewriteLog">RewriteLog</a><br /> 610 <a 611 href="mod/mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</a><br /> 612 <a href="mod/mod_cgi.html#scriptlog">ScriptLog</a><br /> 613 <a 614 href="mod/mod_cgi.html#scriptloglength">ScriptLogLength</a><br /> 615 <a 616 href="mod/mod_cgi.html#scriptlogbuffer">ScriptLogBuffer</a> 617 </td> 618 </tr> 619 </table> 620 621 <h3><a id="pidfile" name="pidfile">PID File</a></h3> 622 623 <p>On startup, Apache httpd saves the process id of the parent 624 httpd process to the file <code>logs/httpd.pid</code>. This 625 filename can be changed with the <a 626 href="mod/core.html#pidfile">PidFile</a> directive. The 627 process-id is for use by the administrator in restarting and 628 terminating the daemon by sending signals to the parent 629 process; on Windows, use the -k command line option instead. 630 For more information see the <a href="stopping.html">Stopping 631 and Restarting</a> page.</p> 632 633 <h3><a id="scriptlog" name="scriptlog">Script Log</a></h3> 634 635 <p>In order to aid in debugging, the <a 636 href="mod/mod_cgi.html#scriptlog">ScriptLog</a> directive 637 allows you to record the input to and output from CGI scripts. 638 This should only be used in testing - not for live servers. 639 More information is available in the <a 640 href="mod/mod_cgi.html">mod_cgi documentation</a>.</p> 641 642 <h3><a id="rewritelog" name="rewritelog">Rewrite Log</a></h3> 643 644 <p>When using the powerful and complex features of <a 645 href="mod/mod_rewrite.html">mod_rewrite</a>, it is almost 646 always necessary to use the <a 647 href="mod/mod_rewrite.html#RewriteLog">RewriteLog</a> to help 648 in debugging. This log file produces a detailed analysis of how 649 the rewriting engine transforms requests. The level of detail 650 is controlled by the <a 651 href="mod/mod_rewrite.html#RewriteLogLevel">RewriteLogLevel</a> 652 directive.</p> 653 <hr /> 654 655 <h3 align="CENTER">Apache HTTP Server</h3> 656 <a href="./"><img src="images/index.gif" alt="Index" /></a> 657 658 </body> 659</html> 660 661