Applicable to:
- Plesk Onyx for Linux
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:CONFIG_TEXT: 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
Comments
4 comments
Unfortunately this didn't help, the include was there, the error still persists.
@anli, Please provide the output of the following commands:
# grep -r load_module /etc/nginx/
and
# cat /etc/nginx/nginx.conf
Worked for me thank you!
@Sabrina Cadena
Thank you for the feedback. Great that the issue is resolved.
Please sign in to leave a comment.