Administration Console Online Help

Previous Next Open TOC in new window
Content starts here

Configure HTTP log file settings for a virtual host


You can change any of the default log file settings for a virtual host.

To specify HTTP log file settings for a virtual host:

  1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
  2. In the left pane of the Console, expand Environment and select Virtual Hosts.
  3. On the Virtual Hosts page, select the instance you want to configure.

    If the table is empty, refer to Create a new virtual host.

  4. On the Configuration: Logging page, select HTTP access log file enabled to activate HTTP logging (or deselect the check box to deactivate HTTP logging).

    HTTP requests for a virtual host are kept in a log file that is separate from the server's log files.

  5. In Log file name, enter the name of the log file.

    To include a time or date stamp in the file name when the log file is rotated, in the Log file name field, add java.text.SimpleDateFormat variables to the file name. Surround each variable with percentage (%) characters.

    For example, if you enter the following value in the Log file name field:

    access_%yyyy%_%MM%_%dd%_%hh%_%mm%.log

    the virtual host's HTTP log file will be named: access_yyyy_MM_dd_hh_mm.log

    When the server instance rotates the HTTP log file, the rotated file name contains the date stamp. For example, if the server instance rotates the log file on 2 April, 2003 at 10:05 AM, the log file that contains the old log messages will be named: access_2003_04_02_10_05.log.

    If you do not include a time and date stamp, the rotated log files are numbered in order of creation filenamennnnn, where filename is the name configured for the log file. For example: access.log00007.

  6. If you want the server to move old HTTP requests to another file when the current HTTP log file reaches a specific size, do the following:
    1. In Rotation type, choose By Size.
    2. In Rotation file size, specify the file size (1 - 65535 kilobytes) that triggers the server to move log messages to a separate file. After the log file reaches the specified size, the next time the server checks the file size, it will rename the current log file and create a new one to store subsequent messages.
  7. If you want the server to move old HTTP requests to another file at specific time intervals, do the following:
    1. In Rotation type, choose By Time.
    2. In Begin rotation time, enter the start time.

      At the time that you specify, the server rotates the current log file. If the time that you specify has already past, then the server starts its file rotation immediately. Thereafter, the server rotates the log file at an interval that you specify in Rotation interval. Use the following java.text.SimpleDateFormat format to specify a date and time: MM-DD-yyyy-k:mm:ss.

      For information about this format, refer to the J2EE Javadoc.

  8. If you want to limit the number of retained files, select the Limit number of retained files checkbox.
  9. To indicate the maximum number of files to retain, enter the number in the Files to retain checkbox.
  10. Determine the log file rotation directory by entering that directory in the Log file rotation directory field.
  11. If you want to rotate the log file on startup, select the Rotate log file on startup check box.
  12. To change the format of the HTTP log file, click Advanced.
  13. Determine the format of the HTTP log file by selecting Common or Extended from the Format list.
  14. Set up HTTP access logs in the Extended Logging Format Fields.

    For information on how to set up the logs, see Setting Up HTTP Access Logs by Using Extended Log Format.

  15. To log time in Greenwich Mean Time, select the Log time in GMT check box.
  16. Click Save.
  17. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
    Not all changes take effect immediately—some require a restart (see Use the Change Center).

Back to Top