Get the most out of your Centmin Mod LEMP stack
Become a Member

Tracking an IP address

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

  1. Andy

    Andy Active Member

    333
    48
    28
    Aug 6, 2014
    Ratings:
    +57
    Local Time:
    9:42 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,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    12:42 PM
    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,947
    6,915
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,413
    Local Time:
    12:42 PM
    Nginx 1.13.x
    MariaDB 5.5