Daemon directory string

Maxim Dounin mdounin at mdounin.ru
Thu Jul 16 05:21:16 MSD 2009


On Thu, Jul 16, 2009 at 02:25:28AM +0300, Marcus Clyne wrote:

> Hi,
> What's the best way to get the path of the directory that nginx was  
> called from (as part of module development)?  Is this stored in a string  
> somewhere?

No.  You should use ngx_conf_full_name() to resolve paths to 
absolute ones.  It uses cycle->prefix (or cycle->conf_prefix), and 
this in turn is set to startup directory if there is no prefix 
(either compiled in or specified via -p switch).

Maxim Dounin

More information about the nginx mailing list