# Load the njs module used by njs/ingress.js. # # The nginx-mod-http-js package ships this same file, but it cannot be relied # on: .templates/ha_automatic_packages.sh moves the rootfs /etc/nginx aside to # /etc/nginx2 before installing nginx, then does `rm -r /etc/nginx` and restores # the saved tree afterwards. That deletes anything the package placed under # /etc/nginx, including its own load_module snippet, and nginx would then fail # to start with "unknown directive js_import". # # Shipping it in the rootfs makes it survive that swap. The filename matches the # package's on purpose: if the package's copy is ever kept instead, it overwrites # this one rather than adding a second load_module for the same module, which # nginx rejects as a duplicate. load_module /usr/lib/nginx/modules/ngx_http_js_module.so;