Issue trying to load njs
vipinvkmenon opened this issue · 2 comments
vipinvkmenon commented
I have a sample config:
load_module modules/ngx_http_js_module.so;
worker_processes 1;
events {
worker_connections 1024;
}
http {
js_import hello.js;
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
server {
listen ${PORT};
location / {
proxy_pass http://localhost:4000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
limit_req zone=one;
}
location /hello {
js_content hello.hello;
}
}
}
but when I try to run it I get the error:
ERR 2023/10/12 11:00:53 [emerg] 7#7: dlopen() "/home/vcap/modules/ngx_http_js_module.so" failed (Dynamic loading not supported) in /home/vcap/app/sample_ngx.conf:1
Where Do I configure the ngx_http_js_module.so? from the njs cli?
jirutka commented
ngx_http_js_module.so
is statically linked in the nginx binary, just remove the load_module
line.
vipinvkmenon commented
Thanks for your quick reply and support :)
That works :). Ill close the issue