Operating System & Version
CentOS 7.7
cPanel & WHM Version
11.86.0.16

Alanca

Registered
Jun 3, 2019
4
0
1
Belgium
cPanel Access Level
Root Administrator
Hello, I currently manage a CentOS 7.7 LAMP-stack VPS that runs on EasyApache 4 on which Node v12.16.1 has been installed as root.
In the past, a Node-RED instance ran just fine on a specific domain and port. My mind is a bit rusty to recall its exact configuration, but that's not important right now.
I serve multiple PHP-based websites and would like to keep this working without breaking anything.

A co-developer has given me a NodeJS app for me to host using Node v12.16.1 alongside the existing Apache. For anonymity I'm going to call the existing PHP-based website for this project, domain, and the NodeJS app that extends this website, nodedomain. The website is accessible via the domain domain.com, and my goal is to make the app accessible via subdomain.domain.com, in other words, Node needs to listen to this subdomain, not Apache.

/home/myaccount/public_html/site1 (PHP)
/home/myaccount/public_html/site2 (PHP)
/home/myaccount/public_html/site3 (PHP)
/home/myaccount/public_html/domain <-- domain.com (PHP)
/home/myaccount/public_html/nodedomain <-- subdomain.domain.com (NodeJS)

I have been breaking my head, reading countless of guides and forum threads about nodeCGI, mod_proxy, passenger, ... but am unable to find the correct procedure for my current situation. Note: As Node is installed as root, it does not appear in the Application Manager in cPanel.

I also prefer to use PM2 to manage running apps (Node-RED and this nodedomain app in the future).

Guided help would be very appreciated!
 
Last edited by a moderator:

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,295
1,255
313
Houston
Hello,

I"m going to be honest and tell you, I don't know the answer here. It sounds like you're going outside of our supported methods for using NodeJS and while it may be possible to configure in the way you're wanting I don't have information on that.

You might find helpful information in the threads here: Continuously run process with pm2 or all of our NodeJS related threads can be found here: Search results for query: NodeJS