- Impact
- 66
Hey guys. Y'all ever think "man I wish I had real time stats to know when someone is on my site, where they are clicking, what site reffered them". Guess what, you CAN! Woohoo!
Apache, the most comon webserver keeps logs of such actions. Logging into your box via the shell, we can see these live stats. Ready? Lets go!
Step 1: Ok, first log into your shell. (SSH always - telnet is not secure at all) Putty is a free SSH client if anyone needs, just type in your domain and boom.
Now we are inside the linux box. Its as if we are sitting right there and we can control it remotely.
Step 2: Lets go to the directory with all our logs in it for all domains hosted on the box. All domains hosted on the box should have a log here. Different servers and configurations might be slightly different but most if not all are located here. Also, if you are not root user its ok. You may only be able to see YOUR domain stats though. Example, if I am bob.com I might not be able to see Mike.com unless super user.
Step 3: Alright. Now we can use any linux command to view these logs. In this example, we want to be constantly looking at the very last part of the log file, to get real time stats, so we will type tail -f domain.com In this case we want the logs for OurVote.us so we type tail -f ourvote.us
Ready for our results???
Amazing! You can see what IP your current visitor is from, what browser he is using, what OS he has, what refferal URL he came from, what current URL he is on now, etc! This screen will update real time. So if you have a high traffic site, watch our your screen might get flooded.
But yep.. This is how lots of site trackers work too. Your webbrowser and webserver interact nicely with each other and give you this data.
Hope yall found this usefull.. This was my first turorial - Made it originally for Invest1010 but thought the world should be more aware of this techniqe. Take care guys! :o
Step 1: Ok, first log into your shell. (SSH always - telnet is not secure at all) Putty is a free SSH client if anyone needs, just type in your domain and boom.
Now we are inside the linux box. Its as if we are sitting right there and we can control it remotely.
Step 2: Lets go to the directory with all our logs in it for all domains hosted on the box. All domains hosted on the box should have a log here. Different servers and configurations might be slightly different but most if not all are located here. Also, if you are not root user its ok. You may only be able to see YOUR domain stats though. Example, if I am bob.com I might not be able to see Mike.com unless super user.
Step 3: Alright. Now we can use any linux command to view these logs. In this example, we want to be constantly looking at the very last part of the log file, to get real time stats, so we will type tail -f domain.com In this case we want the logs for OurVote.us so we type tail -f ourvote.us
Ready for our results???
Amazing! You can see what IP your current visitor is from, what browser he is using, what OS he has, what refferal URL he came from, what current URL he is on now, etc! This screen will update real time. So if you have a high traffic site, watch our your screen might get flooded.
But yep.. This is how lots of site trackers work too. Your webbrowser and webserver interact nicely with each other and give you this data.
Hope yall found this usefull.. This was my first turorial - Made it originally for Invest1010 but thought the world should be more aware of this techniqe. Take care guys! :o












