• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Problems with NodeJS plesk extension

Azurel

Silver Pleskian
I have in plesk onyx the extension nodejs installed. Now for one domain I want use it. Maybe for more.

- After enable nodejs, domain is not accessible and get a "504 Gateway Time-out"

- I don't understand "document root" in nodejs. "httpdocs" is the default document root of a domain. why I must change this and application folder will be the parent of httpdocs?! In your video there is no document root Node.js Support and folder is uploaded in vhost root of the domain.

- How I can add more node apps for one domain? Create a master.js and include every needed js?

- How I can test the app.js is working?

- For what is applicaion url? Its generate a HTTP url, but my domain is HTTPS

- How I install needed depenencies for npm like "winston"?
Solution; Insert in package.json and click on "install npm"-button
 
Last edited:
A short answer would be nice. Is the nodejs exentsion for using nodejs scripts or as replace for the webserver?

I want create a nodejs script that only communicate with my website and send chat and notification data. I need to deinstall this extension and install nodejs directly on server?

When I start nodejs in plesk there is no process with
# ps aux | grep node

That script working fine with command line
# /opt/plesk/node/7/bin/node app.js

Is the GUI not working? I get only a green message box with "Information: The restart.txt file was touched. Application will be restarted after the first request."
 
Last edited:
I have the same problem here. It is curious because it worked at least once.

Now i see no node process running except when using 'npm install' or i execute a script directly from the UI. Problem is the scripts start and are running forever, but once a plesk update occurs they are gone - not that i expected it otherwise but it was a approach for a workaround.

The start script is pretty straight forward express server, and as said it worked.

My setup also includes a set of nginx to proxy the app, this piece changed due some error digging. But i do not see any evidence that it's the problem here, works great when i start the server via UI with a nodemon script.

Here is my nginx, i'll include the start script if needed.

Code:
location ~ / {
    proxy_pass http://localhost:8080;
    proxy_http_version 1.1;

    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection 'upgrade';
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-NginX-Proxy true;

    proxy_cache_bypass $http_upgrade;
}
 
Back
Top