IIS6: How to make log files viewable

FreshPrince

Diamond Member
Dec 6, 2001
8,361
1
0
This used to be easy in IIS5, but in server 2003 using IIS 6, I'm having trouble.

I just want to make the log files available and secured via the OS. However, it lets me browse the folder, but every file I click on, it says it can't find the file. I verified that the user has access to the folder and in IIS. What else am I missing?
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
Make them viewable how?

What do you mean "available and secured via. the OS"?

A user doesnt need any access privilages to IIS in order to view the log files that it creates (which are simply text files).
 

FreshPrince

Diamond Member
Dec 6, 2001
8,361
1
0
I mean viewable via the website.

in the old days of iis5, heh, all you have to do is point to the IIS5 logfiles folder on the local drive and you can browse the whole folder. To lock it down, you just make the directory security windows integrated instead of anonymous. In IIS6, i'm doing the exact same thing. I can browse the folder, but when I click on a log file, it says the file or directory doesn't exist :(
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
oh okay, so you've made the logfolder a virtual directory with IIS so that you can view the logfiles through IIS in a web browser.

When you click on the log file and it "says the file or directory doesnt exist" what is the URL that appears in the address bar? (cut and paste it into here if you can)

Also get the corresponding request out of the log file (open it locally and cut/paste it here if you can).

-Erik
 

FreshPrince

Diamond Member
Dec 6, 2001
8,361
1
0
URL: https://10.10.4.54/logs/in040426.log

web page error:

HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)

iis6 log:

10.10.4.53, -, 4/26/2004, 12:31:31, W3SVC1, TEST, 10.10.4.54, 10, 429, 2109, 401, 0, GET, /logs, -,
10.10.4.53, test\logviewer, 4/26/2004, 12:31:31, W3SVC1, TEST, 10.10.4.54, 20, 629, 567, 200, 0, GET, /logs, -,
10.10.4.53, test\logviewer, 4/26/2004, 12:31:54, W3SVC1, TEST, 10.10.4.54, 0, 405, 1772, 404, 50, GET, /logs/in040426.log, -,
10.10.4.53, test\logviewer, 4/26/2004, 12:31:55, W3SVC1, TEST, 10.10.4.54, 0, 197, 567, 200, 0, GET, /logs, -,
10.10.4.53, test\logviewer, 4/26/2004, 12:31:55, W3SVC1, TEST, 10.10.4.54, 10, 405, 1772, 404, 50, GET, /logs/in040426.log, -,

as you can see, it allows me to get to the logs folder, then I login using the id logviewer. Finally, you see the 404 error :(
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
How about the logfiles that arent currently open for writing (i.e. in040425.log)? Do they give you the same problem?

I'll see if I can replicate this when I get a few free min.
 

FreshPrince

Diamond Member
Dec 6, 2001
8,361
1
0
Originally posted by: spyordie007
How about the logfiles that arent currently open for writing (i.e. in040425.log)? Do they give you the same problem?

I'll see if I can replicate this when I get a few free min.

This is the 1st day I tried openining up the logs folder on my test server, so previous dates won't tell you much.

Darnit, why do management want to view these files anyways? LMAO!
 

spyordie007

Diamond Member
May 28, 2001
6,229
0
0
nevermind I know why... the "log" filetype's mime isnt registered.

goto your website properties and onto the HTTP Headers tab, on the bottom click on "MIMI Types" and add it in.

-Erik
 

FreshPrince

Diamond Member
Dec 6, 2001
8,361
1
0
Originally posted by: spyordie007
nevermind I know why... the "log" filetype's mime isnt registered.

goto your website properties and onto the HTTP Headers tab, on the bottom click on "MIMI Types" and add in one in.

ahh! ya da mang! 'preciate it!

/hands spyordie007 a diet coke :)