Daemon directory string

Marcus Clyne maccaday at gmail.com
Thu Jul 16 16:52:43 MSD 2009


Maxim Dounin wrote:
> Hello!
>
> 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
>
>   
Thanks.





More information about the nginx mailing list