Welcome! Log In Create A New Profile

Advanced

Re: How to config the path for the dynamic module of nginx to access?

Maxim Dounin
December 01, 2016 01:18PM
Hello!

On Thu, Dec 01, 2016 at 10:08:55AM -0800, Ya-wen Lin wrote:

> Thanks for your reply.
> I've already have
> load_module /usr/local/etc/nginx/ngx_http_my_module.so;
> in nginx.conf
> But that "ngx_http_my_module.so" will write out some files, I'd like to
> config the path for those generated files.
> Currently the path seems to be the working folder I start nginx service.

If you use paths in your module you are expected to handle them
much like the nginx itself, depending on context:

- either relative to prefix, like load_module does;
- or relative to conf prefix, like include does;
- or relative to document root, like serving static files.

First two variants are usually handled at configuration parsing
time using the ngx_conf_full_name() function. Last one is usually
done with the ngx_http_map_uri_to_path() function.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

How to config the path for the dynamic module of nginx to access?

Ya-wen Lin November 30, 2016 03:18PM

Re: How to config the path for the dynamic module of nginx to access?

Maxim Dounin December 01, 2016 09:16AM

Re: How to config the path for the dynamic module of nginx to access?

Ya-wen Lin December 01, 2016 01:10PM

Re: How to config the path for the dynamic module of nginx to access?

Maxim Dounin December 01, 2016 01:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 165
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