Symptoms
After installing NodeJS component, the following error is shown at Plesk Home page:
PLESK_ERROR: 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
Cause
Nginx misconfiguration.
Resolution
-
Connect to the server using SSH.
-
Use any text editor to add the following directive into
/etc/nginx/nginx.conf
file right before theevents {
part:include /etc/nginx/modules.conf.d/*.conf;
The result should looks like on the screenshot:
Warning: Make sure that it is added before other configurations includes (for example right after pid file), to load all modules before directive(s) used by some particular module will be declared.
-
Make sure that configuration file
/etc/nginx/modules.conf.d/phusion-passenger.conf
which is loading phusion passenger module exists and has the following content:# cat /etc/nginx/modules.conf.d/phusion-passenger.conf
load_module nginx/modules/ngx_http_passenger_module.so; -
Restart nginx service:
# service nginx restart