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!
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: