Learn about Centmin Mod LEMP Stack today
Register Now

Tracking an IP address

Discussion in 'System Administration' started by Andy, Oct 30, 2014.

  1. Andy

    Andy Active Member

    312
    45
    28
    Aug 6, 2014
    Ratings:
    +54
    Local Time:
    4:34 PM
    I'd like to look through all the activities from a specific IP address accessing my server. I like to find out the time, what url they access, etc.

    Is there a specific command line, access log, etc that I can find out? How far back the access log is kept?
     
  2. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    6:34 AM
    Nginx 1.13.x
    MariaDB 5.5
    Nginx logrotate is setup via lines 38 to 53 of inc/logrotate.inc on initial install and you end up with Nginx logrotate config file at /etc/logrotate.d/nginx which is configured to rotate daily and keep 10 rotations but has override setting to rotate if log file hits 100MB which takes priority over interval rotation

    Code:
    /var/log/nginx/*.log /usr/local/nginx/logs/*.log /home/nginx/domains/*/log/*.log {
            daily
            missingok
            rotate 10
            size=100M
            compress
            delaycompress
            notifempty
            postrotate
                    /sbin/service nginx restart
                   #or
                   #kill -s USR1 'cat /usr/local/nginx/logs/nginx.pid'
            endscript          
    }
    See logrotate info at Understanding logrotate utility | Knowledge Center | Rackspace Hosting
     
  3. eva2000

    eva2000 Administrator Staff Member

    30,152
    6,782
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,133
    Local Time:
    6:34 AM
    Nginx 1.13.x
    MariaDB 5.5