Nginx phusion_passenger throws a configuration template error: unknown directive "passenger_root"

Created:

2016-12-20 11:01:52 UTC

Modified:

2017-08-08 13:25:38 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Nginx phusion_passenger throws a configuration template error: unknown directive "passenger_root"

Applicable to:

  • Plesk Onyx for Linux

Symptoms

During installing NodeJS, the following error can be observed in log file /var/log/plesk/panel.log or directly in Panel at Home page:

ERR [panel] Apache config (14816524790.56007300) generation failed: Template_Exception: nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

Nginx test of configuration is failing:

nginx: [emerg] unknown directive "passenger_root" in /etc/nginx/conf.d/phusion-passenger.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

Cause

Configuration file /etc/nginx/nginx.conf is not correctly configured or was changed manually for NodeJS.

Resolution

  1. Add the following directive into /etc/nginx/nginx.conf

    include /etc/nginx/modules.conf.d/*.conf;

    Make sure that it is added before other configurations include (for example right after pid file), to load all modules before directive(s) used by some particular module will be declared.

  2. Restart nginx:
    # service nginx restart
Have more questions? Submit a request
Please sign in to leave a comment.