Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how do i view .htaccess logs
#1

hi all

 

how can I see what ip's are accessing the .htaccess protected pages ?

 

let me know

 

cheers

anyweb

Reply
#2

Hum, quick'n'dirty:

 



Code:
grep -v "\- \-" access.log|cut -d' ' -f1|uniq




 

Short explanation:

grep -v "\- \-" access.log: shows only access lines that are authenticated

cut -d' ' -f1: prints the first field of the space separated line (which is the IP address in the logs)

uniq: removes all duplicate IP addresses

Reply
#3
they will turn up in the normal logs, 200 = successful login, 401 = failed login
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)