Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a hosted dedicated server with a site in IIS 7.5. This site has various bindings that allow external access to it (www.foo.com, www.bar.com, www.baz.com). I would like to know how i can have statistics of how the site is being accessed. How many times it was accessed through www.foo.com, for example. How can I achieve that?

Thanks.

share|improve this question
add comment

4 Answers 4

up vote 1 down vote accepted

Wouldn't configuring IIS to log the cs-host property allow you to see what site they were visiting?

share|improve this answer
    
Thanks Joe. I think this is the best way of doing what I want. Now I need a good log parser. Do you know a good one? –  Norberto Nov 18 '10 at 11:47
    
I don't do a lot of IIS log parsing, but I have used this in the past: weblogexpert.com. If I remember correctly they have a scaled down free version and a feature packed paid version. –  joeqwerty Nov 18 '10 at 12:27
add comment

Use IIS Advance Logging option that would be helpful. There are also Options are available to write logs with options available as following:

http://msdn.microsoft.com/library/ms524602.aspx http://learn.iis.net/page.aspx/579/advanced-logging-for-iis-70---custom-logging/

Gaurav Maniar MCP | MCSE | MCST | MCITP | ITILv3 Certified

share|improve this answer
add comment

If you have PHP installed, you could write a script with the SERVER_NAME or HTTP_HOST variable and include it on the index page.

Some pseudocode:

if visitor HTTP_HOST = www.foo.com
then increase $foocount by 1
else if visitor HTTP_HOST = www.bar.com
then increase $barcount by 1
else if visitor HTTP_HOST = www.baz.com
then increase $bazcount by 1

$foocount, $barcount, $bazcount could be anything from a text file to a database. It could also mean "load specific 1x1 pixel image", and then see how many times each pixel image has been accessed. As long as you know about HTTP_HOST and SERVER_NAME, there are many ways to implement a visitor counter.

share|improve this answer
add comment

Um, Google Analytics?

share|improve this answer
    
I'll check if it can do what i want. Thank you. –  Norberto Nov 17 '10 at 18:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.