<div dir="ltr">Thanks for your reply.<div>I've already haveĀ <br>load_module /usr/local/etc/nginx/ngx_http_my_module.so;</div><div>in nginx.conf</div><div>But that "ngx_http_my_module.so" will write out some files, I'd like to config the path for those generated files.</div><div>Currently the path seems to be the working folder I start nginx service.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 1, 2016 at 6:14 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello!<br>
<span class=""><br>
On Wed, Nov 30, 2016 at 12:15:46PM -0800, Ya-wen Lin wrote:<br>
<br>
> Hi,<br>
><br>
> I've read the related documents and tried googling but the results are all<br>
> about how to assign the path to the module's implementation c code for<br>
> nginx to compile a module.<br>
><br>
> My module will read/write files upon end-user's request, and my question is<br>
> how to set the path so that my module will directly read/write in that<br>
> directory.<br>
><br>
> I found that without extra settings, my module will read/write the folder I<br>
> initiate nginx. For example, if I run sudo nginx where pwd is /Users/me/<br>
> html/data, then the dynamic module will read/write files from<br>
> /Users/me/html/data.<br>
><br>
> What would be the best practice to set the path to access data for my<br>
> module?<br>
<br>
</span>Paths to modules as specified in the load_module directive are<br>
resolved from --prefix as set during ./configure, much like many<br>
other paths in nginx.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/" rel="noreferrer" target="_blank">http://nginx.org/</a><br>
<br>
______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br>
</font></span></blockquote></div><br></div>