Apache Log Viewer makes viewing, searching, filtering, and analyzing the Apache logs easier on a Windows server than it is on a Linux server. Jack Wallen provides instructions on installing and using the tool.
When running Apache on Linux, it's fairly simple to open a terminal window, navigate to /var/log/apache, and read through the various log files. Apache on Windows isn't quite as simple -- at least from the command line. Fortunately there is an outstanding GUI tool called Apache Log Viewer that allows you to, with the help of easy GUI goodness, view all of the Apache logs from one window.
The Apache Log Viewer is a free application that allows the Apache administrator to view, search, filter, and analyze the Apache logs. It is also possible to generate reports and statistics from those log files. The built-in analysis software will analyze things like: IP addresses, dates of access, request, Apache status code, size, and country. The tool can be installed on Windows 2000/XP/2003/Vista/7/Server 2008.
- Easy installation (Windows Application)
- Does not require installing on Apache Server/IIS
- Color code Log lines according to status codes
- Translate IP to Country using GeoLite Database (fast with no lookups)
- Search for IP Address, Request String, Date, Referrer
- Filter according to HTTP Status Code (or Range)
- Export to text file/comma separated value, txt/csv
- Visual Reports (Pie/Bar Charts)
The installation is as simple as any other Windows installation. You just download the installer, double-click, and walk through the installation wizard. Once it's installed, a new menu entry will be created. Click that new menu entry, and Apache Log Viewer will start.
Running Apache Log ViewerWhen Apache Log Viewer is first run, nothing will appear in the window because no logs are open. You have to locate the logs you want to view. With most WAMP servers, there are tools that reside in the System Tray that allow you to, with a click of the mouse, open the log files. I suggest you do this in order to locate the log files because, depending on which WAMP server you used for installation, the log files will be in a different spot. You could also do a search for "access.log" or "error.log". Once you locate your log files, in order to have Apache Log Viewer see them, click File | Open and then navigate to the log file you want to view. As long as your Apache server is getting hits, that window will start filling up soon (Figure A). Figure A
I have both the access and the error logs open in different tabs.
One nice feature of Apache Log Viewer is auto-refresh. You can't see this button in Figure A, but when the window is enlarged, there is a button to click for auto-refresh. If this is not enabled, you will have to refresh your window when you want to see new information. If your server is getting slammed, auto-refresh might not be the best option, since the data will be flying by too fast for you to analyze.
Making use of your data
If you see a particular entry in any of the log files that bears examining, all you have to do is right-click the entry, and a menu will appear allowing you to:
- Open Referrer
- Copy IP
- Copy Referrer
- Copy Request
- Copy UserAgent
- Find Similar
- Find Similar (with host)
The Find Similar feature is a nice touch. It allows you to find entries in the log file that contain similar information to the highlighted entry, saving quite a bit of time, especially when the log file is on an active server.Anther nice feature of the Apache Log Viewer is the ability to see various Hits reports. Click Reports and then click Hits to open a Date Range window (Figure B). Select the dates to be viewed and then click OK. This will open up a small window that will tell you how many hits you've received in the dates selected. Figure B
Quick and easy access to hits according to a date range. It is possible to select a single date or sequential dates.
I also particularly like the Advanced filter, which you can see in the lowest tool bar in Figures A or B. With this tool, it is possible to enter an IP Address to filter, for example. When this is done, only results in the log that include that IP Address will appear.
It's difficult to believe that someone has actually made a task easier on a Windows server than it is on a Linux server, but Apache Log Viewer does make handling Apache logs very much a no-brainer. Slap this tool on your Apache server and see if it doesn't make your life easier.