Hi list,
Is there a general way to extract the nginx config file path, in a third
party program?
I see the sudo strace -s reload has this line
open("/etc/nginx/nginx.conf", O_RDONLY|O_LARGEFILE) = 4
but how can I get the string /etc/nginx/nginx.conf ?
I presume I have three ways:
- ps aux perhaps there is a command line like nginx -c /etc/my.conf
- nginx -V will list the default conf path
- If #1 and #2 fails, could it be done reading nginx’s process image in
memory?
Are there any other scenarios? How do I achieve the #3 way?
Thanks in advance!
est