rename IIS log file directory name

Posted on 2010-01-08
Last Modified: 2012-05-08
IIS 6 on Windows 2003

My web servers are logging to directories with names like W3SVC125896208.  IIS properities has Log file directory of "D:\Logfiles".  The system is creating the W3SVC125896208.  Can that be changed to web1logs?  Therefore, D:\Logfiles\web1logs instead of D:\Logfiles\W3SVC125896208.

Question by:magnusthorne
    LVL 31

    Accepted Solution

    two things
    The log files are then separated by the site Instance ID. For example the default web site is always stored as W3SVC1, any new web sites you create will have a different number appended to the W3SVC foldername
    moving location is easy....Go to Start -> Control Panel -> Administrative Tools Run Internet Information Services (IIS). Find your Web site under the tree on the left. Right-click on it and choose Properties. On the Web site tab, you will see an option near the bottom that says "Active Log Format." Click on the Properties button. At the bottom of the General Properties tab, you will see a box that contains the log file directory and the log file name. The full log path is comprised of the log file directory plus the first part of the log file name.
    LVL 8

    Expert Comment

    No you can't, not from IIS, but once the log file is created you could rename it.
    LVL 17

    Expert Comment

    You are mistaken. You can change this path.

    By default IIS will assign a random number for the SiteID for a new site. This is stored in the metabase.

    Have a look at this post from ex-IIS team David Wang.

    That explains how to change the site ID for any site.
    LVL 17

    Expert Comment

    Forgot to say you cannot have it exactly as you want in the as in the site id as: web1logs

    It needs to be  in the same format like W3SVC<numbert> so yo ucna have W3SVC1 or W3SVC2 ,etc ,etc
    LVL 31

    Expert Comment

    by:James Murrell
    Well done all for saying what i said
    LVL 17

    Expert Comment

    I don't understand cs97jjm3

    I Answered the question differently to you.

    Your solution would have kept the siteID as often somthing unsightly 1232415627, etc

    I said you can change the siteID which is a different solution therefore it is not saying what you said.

    You should read the link.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    Lync server 2013 Backup Service Error ID 4049 – After File Share Migration
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now