Changing Apache Log Location?

Discussion in 'Home Networking' started by Steven, Sep 3, 2004.

  1. Steven

    Steven Guest

    Hi, I have just set up Apache on a local pc, and was wondering if
    someone might be able to tell me where in the configuration file I need to
    be editing to save the 'access log' to a different location than the
    default. The log is currently saved at the default location. I need the
    log to be saved at


    Can I instruct apache to save the log at this location without having to
    save other files to this location too?

    What do I need to add and to where in the config file to achieve this...?

    T.I.A Steven
    Steven, Sep 3, 2004
    1. Advertisements

  2. Steven

    Rob Morley Guest

    The config file is self-documented - it contains stuff like

    # Configuration and logfile names: If the filenames you specify for many
    # of the server's control files begin with "/" (or "drive:/" for Win32),
    # server will use that explicit path. If the filenames do *not* begin
    # with "/", the value of ServerRoot is prepended -- so "logs/foo.log"
    # with ServerRoot set to "E:/Program Files/Apache Group/Apache2" will be
    interpreted by the
    # server as "E:/Program Files/Apache Group/Apache2/logs/foo.log".
    # NOTE: Where filenames are specified, you must use forward slashes
    # instead of backslashes (e.g., "c:/apache" instead of "c:\apache").
    # If a drive letter is omitted, the drive on which Apache.exe is located
    # will be used by default. It is recommended that you always supply
    # an explicit drive letter in absolute paths, however, to avoid
    # confusion.


    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a <VirtualHost>
    # container, they will be logged here. Contrariwise, if you *do*
    # define per-<VirtualHost> access logfiles, transactions will be
    # logged therein and *not* in this file.
    CustomLog logs/access.log common
    Rob Morley, Sep 3, 2004
    1. Advertisements

  3. Steven

    Steven Guest

    Hi Rob... I have already read the info in there and as I interpret it, my
    entry should read:

    CustomLog e:/ftp server/access.log common

    Unfortunately this doesn't work....
    The server responds on startup with 'Error' and shuts down.

    I want the access log to be stored on e:/ftp server/access.log

    Am I doing something wrong?

    Steven, Sep 3, 2004
  4. Steven

    Chris Lloyd Guest

    This should work

    CustomLog "e:/ftp server/access.log" common

    You need to use double quotes for it to work

    Chris Lloyd, Sep 3, 2004
  5. Steven

    Steven Guest

    Thanks ever so much Chris.. You have saved the few hairs I have left on my
    head : - )

    Amazing what a pair of " " can do!

    Thanks Again

    Steven, Sep 3, 2004
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.