Nginx find open logfiles without knowing the configuration

Sometimes you don't know where's the log of nginx

find PID of httpd (same concept applies for nginx and other programs):

# ps axu |grep httpd
...
root 17970 0.0 0.3 495964 64388 ? Ssl Oct29 3:45 /usr/sbin/httpd
...

Then search for open logfiles using lsof for the PID:

# lsof -p 17970 |grep log
httpd 17970 root 2w REG 253,15 2278 6723 /var/log/httpd/error_log
httpd 17970 root 12w REG 253,15 0 1387 /var/log/httpd/access_log