大网数据广告活动
服务器运维问答

Where does nginx expect to find its modules?

· 52CE 我爱测

Where does nginx expect to find the binary files for its modules? For example, by convention, where should I install module nginx_ajp_module ?

问题原文

原帖链接 · Derek Mahar · CC BY-SA 3.0

Where does nginx expect to find the binary files for its modules? For example, by convention, where should I install module nginx_ajp_module?

已采纳解答

原帖链接 · Michael Hampton · CC BY-SA 3.0

The module path will vary depending on the Linux distribution you're using. Some distros (e.g. Debian-based) may put it in strange places.

To find the module path on your system, run nginx -V and look for the --modules-path in the output. For example:

nginx version: nginx/1.10.1
built by gcc 6.1.1 20160510 (Red Hat 6.1.1-2) (GCC) 
built with OpenSSL 1.0.2h-fips  3 May 2016 (running with OpenSSL 1.0.2j-fips  26 Sep 2016)
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules ...

You should also be aware that dynamic module loading was only introduced in the 1.10 development cycle. Modules older than this were designed to be compiled directly into nginx, and would need to be updated for dynamic loading. The module you linked to is such a one. Contact its developer for further information.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-11-02)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。