problem installing nginx-module-njs

Discussion in 'ISPConfig 3 Priority Support' started by conductive, Mar 21, 2019.

  1. conductive

    conductive Member HowtoForge Supporter

    Running NGINX on Stretch
    When I attempt to install nginx-module-njs I get the following errors.
    apt --fix-broken install did not help.

    # nginx -v
    nginx version: nginx/1.10.3

    apt-get install nginx-module-njs
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt --fix-broken install' to correct these.
    The following packages have unmet dependencies:
    libnginx-mod-http-dav-ext : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-http-echo : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-http-geoip : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-http-image-filter : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-http-subs-filter : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-http-upstream-fair : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-http-xslt-filter : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-mail : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    libnginx-mod-stream : Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    nginx-full : Depends: libnginx-mod-http-auth-pam (= 1.10.3-1+deb9u2) but it is not going to be installed
    Depends: nginx-common (= 1.10.3-1+deb9u2) but it is not going to be installed
    nginx-module-njs : Depends: nginx (= 1.14.2-1~stretch)
    E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)​
     
    Last edited: Mar 21, 2019
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, did you mix repositories or use backports? There is no nginx 1.14.2 in the Debian stretch repo as far as I know: https://packages.debian.org/stretch/nginx
     
  3. conductive

    conductive Member HowtoForge Supporter

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    The packages from nginx.org are not compatible with ISPConfig and the package is not for the nginx form Debian, its for a different nginx package series provided by nginx.org. Using that repo will break an ISPConfig server as the packages form nginx.org configure nginx to run as user 'nginx' instead of the standard debian user 'www-data'. If this package does not exist in the official Debian repos, then you can't install it right away.
     
  5. conductive

    conductive Member HowtoForge Supporter

    Till,
    Thanks for the info

    How do I do this?

    Thanks
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Your citation reverses the original sentence. The problem is that the server may NOT run as user nginx, but the packages from nginx.org run under that user. You might be able to change that in the config files that ship with that nginx package.
     
  7. conductive

    conductive Member HowtoForge Supporter

    I want to be able to run javascript. Even though javascript is on the client side for some reason it does not work.

    How is this done?

    Thanks for your help
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Javascript in a website or javascript as a server-side program (e.g. that replaces PHP)? Javascript in a website as it is commonly used in most sites and does not require a server side module like njs, it is executed in the client only. If it does not work, then there is most likely a problem in your javascript code, use the debug console of your web browser to find out what's wrong with that script.
     
  9. conductive

    conductive Member HowtoForge Supporter

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    THats JavaScript in a website, so you don't need server side javascript or the njs module for that.
     
  11. conductive

    conductive Member HowtoForge Supporter

    That makes sense since javascript it client side.

    Why would code that works on Codepen not work on the server?
    What is the problem with my deployment?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Use the debug console of your browser to debug the JS code.
     
  13. conductive

    conductive Member HowtoForge Supporter

    I moved:
    <script src="******.js"></script>
    to the end of the .html file and the javascript worked.
     
    till likes this.

Share This Page