Below is a ready-to-use script. Review and adapt variables to your environment.
#!/usr/bin/env bash
LOG="/var/log/nginx/access.log"
echo "Top IPs:"
awk '{print $1}' "$LOG" | sort | uniq -c | sort -nr | head
echo
echo "Top URLs:"
awk '{print $7}' "$LOG" | sort | uniq -c | sort -nr | head