Node.js with Nginx Unit on DirectAdmin

NemamNadimak

New member
Joined
Jul 17, 2023
Messages
1
So I am having troubles with this and I would appreciate if someone can shed me some light or provide tutorial how to run node.js app with Nginx unit.

I installed Direct Admin and enabled Nginx Unit.

I created user and I see Nginx unit icon. I took Hello world app from this man page.

After that I tried to follow rest of the steps, but after I create Application with the following settings

Name: App
Working directory: /home/user/domains/example.com/public_html/myapp
Script: app.js

it proceeds to create a route.

Once on the screen, there is no any template available for Node.js so I assume I can skip it

in the rest of the fields whatever paths and values I enter I get

"Reconfiguration Error: Value doesn't exist."

What I am not seeing?
 
So I am having troubles with this and I would appreciate if someone can shed me some light or provide tutorial how to run node.js app with Nginx unit.

I installed Direct Admin and enabled Nginx Unit.

I created user and I see Nginx unit icon. I took Hello world app from this man page.

After that I tried to follow rest of the steps, but after I create Application with the following settings

Name: App
Working directory: /home/user/domains/example.com/public_html/myapp
Script: app.js

it proceeds to create a route.

Once on the screen, there is no any template available for Node.js so I assume I can skip it

in the rest of the fields whatever paths and values I enter I get

"Reconfiguration Error: Value doesn't exist."

What I am not seeing?
having the same issue, do u find a solution ?
 
I still having the same issue too, did you find a solution at this time?
 
Hello,

Faced the same error, and the following command helped in my case:

Code:
/usr/local/directadmin/custombuild/build rewrite_confs

You might try the same.
 
I'm experiencing the same problem; no matter what I do, I get a 503 error... A simple single-file app.js file, without a backend, prints "Hello World" and it works flawlessly.... But when I try to run an application with a backend, I can't; I constantly get problems, constantly meaningless 503 errors.
 
Isn't there a video showing how to develop and publish a seamless backend application for Node.Express using a direct admin panel interface?
 
I'm experiencing the same problem; no matter what I do, I get a 503 error... A simple single-file app.js file, without a backend, prints "Hello World" and it works flawlessly.... But when I try to run an application with a backend, I can't; I constantly get problems, constantly meaningless 503 errors.

The simple Hello-World application would be like the following:

JavaScript:
const http = require('http');

const port = process.env.PORT || 3000;

http.createServer(function(request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end("Hello, World! From Node.JS (2)\n");
}).listen(port);

console.log(`App is running... (port: ${port})`);

It's a working example tested be me.
 
Back
Top