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.
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
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..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With