Nginx Module http
i am using nginx on one of my server, i download its source and compile it using:
./configure --prefix=/opt/nginx --user=nginx --group=nginx --with-http_ssl_module
--conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log
--http-log-path=/var/log/nginx/access.log
--add-module=/opt/ngx_http_substitutions_filter_module
--with-http_stub_status_module
setup and add files in conf.d and its working ok. but suddenly when i restart it its giving me error msg:
nginx: [emerg] unknown directive "stub_status" in /etc/nginx/conf.d/mytest.conf:6
i looked into more details and find out it was unable to load the module "http_stub_status_module". i know i compiled it with installation.
My Question is there any way i can reload this module or add somewhere in conf to make it working??**i dont want to install it again because if i compiled it again it will remove my current configuration.
Unlike other software such as Apache, Nginx has no mechanism for loading modules at runtime; they have to be compiled in.
If you run nginx -V
on the old version before building a new one, you will get a message that includes the configure
command it was built with. Try using the same one in your new source tree; if you don't actually have the modules you need available, it will fail at that point. If both the configure with the same command and the subsequent build succeed, you should be reasonably confident that your new build has the same functionality as the old. Of course you still have to watch out for any breaking changes that might have been made to nginx itself or any of those modules..
You need to compile nginx with stub_status, pass the following to your ./configure file:
--with-http_stub_status_module to ./configure
Gentoo users: enable the expanded USE-Flag status
and recompile nginx. Example of /etc/portage/package.use/nginx:
www-servers/nginx NGINX_MODULES_HTTP: stub_status
Finally, do this: emerge -pav nginx
The problem is that you probably have more than one nginx binary on your system, and now trying to load that one without the module. It's a common situation when someone compiles something himself from sources after installing through a package manager.
链接地址: http://www.djcxy.com/p/95184.html上一篇: NGINX启动作业(initd)不停止
下一篇: Nginx模块http