5. Logging function
The logging function of the server rarely becomes the primary focus, but it is an indispensable assistant for day-to-day server management and monitoring. IIS 6.0 has many significant improvements in logging capabilities, but unfortunately, W3SVC log events are still not logged in local time.
In IIS 6.0, the logging function has been implemented by the kernel mode. This improvement speeds up log writing while avoiding multiple worker processes competing for the same log file. In some special cases, an error will be encountered, at which time it should but cannot write log information to the log of the web site. For example, the worker process is being recycled, prohibits processing of user requests, or the user attempts to connect to the server, but only part of the information required by IIS is provided in the request. If this happens, the event will be written to a new log file.
Log files are very important in the process of troubleshooting and optimizing IIS 6.0. By default, the file is saved in the /system32/logfiles directory, but it can be modified. The modification method is to find the HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/HTTP/Parameters registration subkey, add a string value called ErrorLoggingDir under it, and set the full path to save the log file in ErrorLoggingDir. Information that can be found in the log file includes: all 503 (service is not available) errors, idle connection timeout, various errors occurring when parsing the URL, and the last 10 requests submitted to the failed application pool.
IIS 6.0 also has a function called binary logging. After enabling this function, IIS 6.0 will write all log information of the web website to a log file in binary format, with the extension of the log file being .ibl. To enable binary logging, just set the W3SVCC/CentralBinaryLoggingEnabled entry of the configuration file to ture (1). This feature should be very useful for ISPs. There may be 1000 or more web sites on each machine of an ISP. If each web site generates a log file per day, the total number of log files will soon reach an astronomical number. Microsoft's recently released Log Parser 2.0 tool can read binary log files and generate reports, which can be downloaded from /download/iis50/utility/2.0/nt5xp/en-us/. Log Parser 2.0 can also read the files introduced earlier and generate reports.
Since a long time ago, IIS has allowed to specify directories for log files to be saved on local servers. However, although IIS Managers for IIS 5.0 and IIS 4.0 allow you to enter a path to a remote server's Universal Naming Specification (UNC) when specifying a log file path, the web server does not actually save the log to the remote server. Only IIS 6.0 really supports UNC path names for log file paths.
6. Website ID
For IIS servers, the only thing that identifies a website is not the name of the website, but the ID value of the website. When we create a new website in IIS 5.0 and IIS 4.0, the web server assigns the next available number sequence number to the website (that is, the number specified by the web server to the default site is 1, the next website is 2, followed by 2, 3, 4, etc.), this number
Words are the unique ID of the website. If you want to access a website's log file, you must first know the website's ID, because the log file is saved in the /W3SVC/<site ID number> directory. If more than one website is running on the web server, it is impossible to determine which log directory belongs to which website by relying solely on the path name of the log file. In addition, website ID is essential whether when writing administrative scripts or modifying configuration data files. For example, when specifying the ADSI (Active Directory Service Interface) path in the IIS configuration data file, you often need to specify the correct website ID.
Nevertheless, in IIS 5.0 and IIS 4.0, the ID number of the website cannot be found directly from the IIS Manager. To this end, the manager of IIS 6.0 has added a new "Identifier" column to the website list, and the content of the column is the website ID number. However, even if there are only two or three websites on the IIS 6.0 web server, the website's ID may be very large, such as 387660891 (so the log file path of the website is /W3SVC/387660891). It should not be surprising that IIS 6.0 no longer specifies the website's ID in order - it calculates the website's ID based on the website's name.
If you have written some scripts to assist in management, these scripts require the original website ID generation method to generate the original website ID. You can disable the new IIS 6.0 ID generation method. The specific operation steps are: find the HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/InetMgr/Parameters registration subkey, create a REG_DWORD value IncrementalSiteIDCreation, and set it to 2 (note that by default, this key does not exist).
Previous page1234Next pageRead the full text