Welcome! Log In Create A New Profile

Advanced

Get conf location of a running nginx process

est
October 11, 2012 09:10PM
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:

1. ps aux perhaps there is a command line like nginx -c /etc/my.conf
2. nginx -V will list the default conf path
3. 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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Get conf location of a running nginx process

est October 11, 2012 09:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready