Unable to run Node.js on subdomain

Operating System & Version
Cent OS 7.8
cPanel & WHM Version
88.0.11

Raikan10

Registered
Jul 18, 2020
2
0
1
india
cPanel Access Level
Root Administrator
So I want to run a website and a rest API(with node) on the same subdomain. I first setup everything for the website and it works great, now for the api, I want to make it accessible in the URI subdomain/api. So i followed the steps mentioned here .

I was able to run the application and send requests to it using curl and everything works great, but i am unable to access the API on http://subdomain/api even after registering the application. if I go to the url on the browser I get "Internal Server Error".

I would be really grateful for any help I can get. Thank you.
 

Raikan10

Registered
Jul 18, 2020
2
0
1
india
cPanel Access Level
Root Administrator
What's output in the error logs? Did you create app.js in the subdomain's home directory or the root domain's?
I created the app.js inside the subdomain's directory and I linked that directory in the Application Manager. I also don't know how to access the logs for this? can you help me out?
 
Last edited: