Log IPs of users authenticating a password-protected directory?

Avatar
  • Answered
My client wants to know which countries (IPs will be sufficient) access a password-protected directory using one of several user/password combinations.
For example, with two user/password options for /protectedDirectory, how can I get an idea of which user/password combination was used to access /protectedDirectory/index.html?

I don't see in even the raw http logs where a file access describes which user name was used to access the file.
Avatar
johnpaulb-imhs1
Hello,

Thank you for your question about logging IP's of authenticated users. A solution to this would have to be developed/coded, since there is no built in way to do this with cPanel, etc.

A possible solution would be to used a keyed URL for a successful login. For example, when they login on a specific page they would be redirected to example.com/login?=1234565.

Then you can review the logs to see which IP addresses accessed a page with that key (1234565).

Thank you,
John-Paul