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