Welcome! Log In Create A New Profile

Advanced

Re: load_module with "./configure ... --modules-path=<path> ..."

Maxim Dounin
July 12, 2023 08:38PM
Hello!

On Wed, Jul 12, 2023 at 06:40:21PM -0300, Fabiano Furtado Pessoa Coelho wrote:

> Hello...
>
> I have compiled NGINX 1.24.0 with "./configure ... --modules-path=<path> ...".
>
> Therefore, the "load_module" directive is not reading the path/config
> specified in "--modules-path" parameter. For instance, in nginx.conf,
> I have declared "load_module ngx_http_module1.so;" and when I test it,
> the following message appears:
> # nginx -t
> nginx: [emerg] dlopen() "/etc/nginx/ngx_http_module1.so" failed
> (/etc/nginx/ngx_http_module1.so: cannot open shared object file: No
> such file or directory) in /etc/nginx/nginx.conf:12
> nginx: configuration file /etc/nginx/nginx.conf test failed
>
> Why? Should the "load_module" directive read "--modules-path" value,
> if specified in "./configure"? From the "load_module" official
> documentation (http://nginx.org/en/docs/ngx_core_module.html#load_module),
> there is no default value defined, but, once "--modules-path" is
> configured, the "load_module" directive should read from
> "--modules-path", right? If not, what is the purpose of "./configure
> ... --modules-path=<path> ...", to compile NGINX?
>
> Of course, if I specify the full path "load_module
> /<path>/ngx_http_module1.so;", it works fine.

The "--modules-path" configure option defines a directory where
dynamic modules will be installed by "make install" and only used
during installation.

The "load_module" configuration directive, if used with relative
paths, resolves such paths from "--prefix", much like most of the
configuration directives. Note the example in the documentation
(http://nginx.org/r/load_module):

load_module modules/ngx_mail_module.so;

This example assumes the default "--modules-path", so modules are
installed into the "modules" directory under prefix.

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx mailing list
nginx@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

load_module with "./configure ... --modules-path=<path> ..."

Fabiano Furtado Pessoa Coelho July 12, 2023 05:42PM

Re: load_module with "./configure ... --modules-path=<path> ..."

Maxim Dounin July 12, 2023 08:38PM

Re: load_module with "./configure ... --modules-path=<path> ..."

Fabiano Furtado Pessoa Coelho July 13, 2023 02:10PM

Re: load_module with "./configure ... --modules-path=<path> ..."

Maxim Dounin July 14, 2023 11:34AM

Re: load_module with "./configure ... --modules-path=<path> ..."

Fabiano Furtado Pessoa Coelho July 14, 2023 11:38AM

Re: load_module with "./configure ... --modules-path=<path> ..."

Sergey A. Osokin July 12, 2023 08:40PM

Re: load_module with "./configure ... --modules-path=<path> ..."

Fabiano Furtado Pessoa Coelho July 13, 2023 02:10PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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