Symptoms
-
Unable to start NodeJS application from Domains > example.com > NodeJS > Enable
-
No errors are displayed in Plesk Panel
-
No Nginx installed on the server, only Apache is used
-
The configuration made in Plesk > Domains > example.com > Node.js is accurate and made in accordance with the information in How to run a simple node.js application in Plesk to test it working?
-
The following error shows up when trying to enable NodeJS via CLI:
# plesk ext nodejs --enable -domain example.com
Execution nginx_modules_ctl has failed with exit code 1, stdout: , stderr: START nginx_modules_ctl --enable phusion-passenger
/usr/local/psa/admin/sbin/nginx-config: line 272: /usr/sbin/nginx: No such file or directory
Nginx configuration after enable of 'phusion-passenger' is in invalid state, rollback the change
Cause
This happens due to an identified bug with ID EXTNODEJS-327 which will be fixed in the future releases of NodeJS extension.
Resolution
Until a fix is released the following workaround can be used:
-
Perform any change on PHP from Domains > example.com > PHP
Note: Change PHP version for any different version and then go back and configure the original version.
-
Connect to the server via SSH
-
Enable NodeJS application via command line as below:
# plesk ext nodejs --enable -domain example.com
Additional information
How to Host Node.js Applications on Plesk Obsidian
How to run a simple node.js application in Plesk to test it working?