Hello,
I installed the wowonder script on a clean server on which I installed the Hestiacp control panel
It is a social networking script.
The script developer recommends using NodeJS to receive messages and notifications via chat directly and to reduce the load on the server by 80%.
But the instructions in the documentation are insufficient on how to configure it.
This is a picture of inside the control panel of what is required.
Can you advise how to configure NodeJS
As shown in the picture, the path to the security certificate files is correct for .key and .crt?
Thank you for your interest.
The script basically works perfectly with port 80 of localhost, but the script developer recommends using the NodeJS-based extension, which is located in a subfolder within the script folders. Below are images of the script files:
The full path to the startup file: /home/user/web/domain/public_html/nodejs/main.js
The developer of the script says that activating the NodeJS extension will allow messages, calls, and notifications to arrive in real time, and it reduces the load on server resources by 80%, whereas if it is turned off, notifications will arrive slowly, or when the page is refreshed, or they may not arrive at all.
What is required is the correct way to configure NodeJS so that the plugin works along with the script.
The developer of the script says that activating the NodeJS extension will allow messages, calls, and notifications to arrive in real time, and it reduces the load on server resources by 80%, whereas if it is turned off, notifications will arrive slowly, or when the page is refreshed, or they may not arrive at all.
The following image shows the options available within the script to enable or disable NodeJS.
NodeJS is now activated in the dashboard, but messages and notifications do not work. If it is stopped, they will work, but sometimes they arrive and sometimes they do not, and notifications do not appear unless the page is refreshed.
What is required is the correct way to configure NodeJS so that the plugin works along with the script.
My other question was: Are the paths shown in the following image for the SSL certificate correct, as it is a required option for NodeJS to work with the https protocol?
dude, do it separatly from hestia. just intall NodeJS, npm, pm2 properly. then run the script in background via pm2, with auto restart. on specific port which is not in use [no need to configure SSL, because which method i am telling, it will apply ssl automatically].
then install docker and docker compose properly in your system.
go to cloudflare zero trust, create an new tunnel, click on docker, copy the command and add “-d” at last [also add autorestart policy if you want].
then go to cloudflare zero trust > tunnel > select created tunnel [make sure status is active] > click on configure > add your website with http and ip port and select domain > save it.
Let me thank you.
I don’t use Cloudflare.
Today I already installed NodeJS, npm, pm2
And I opened ports 3000 and 449 in hestia firewall
When I execute the run command, I see the status online.
pm2 start main.js
While when I execute the command pm2 list
I see the status errored
I tried to read the log using the command pm2 logs main [--lines 1000]
I saw the following errors
[TAILING] Tailing last 15 lines for [main] process (change the value with --lines option)
/root/.pm2/logs/main-out.log last 15 lines:
/root/.pm2/logs/main-error.log last 15 lines:
0|main | Require stack:
0|main | - /home/user/web/domain.com/public_html/nodejs/main.js
0|main | at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
0|main | at Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
0|main | at require (node:internal/modules/helpers:130:18)
0|main | at Object.<anonymous> (/home/user/web/domain.com/public_html/nodejs/main.js:1:16)
0|main | at Module._compile (node:internal/modules/cjs/loader:1241:14)
0|main | at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
0|main | at Module.load (node:internal/modules/cjs/loader:1091:32)
0|main | at Module._load (node:internal/modules/cjs/loader:938:12)
0|main | at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|main | at Module._compile (node:internal/modules/cjs/loader:1241:14) {
0|main | code: 'MODULE_NOT_FOUND',
0|main | requireStack: [ '/home/user/web/domain.com/public_html/nodejs/main.js' ]
0|main | }
0|main | Error: Cannot find module 'moment'
0|main | Require stack:
0|main | - /home/user/web/domain.com/public_html/nodejs/main.js
0|main | at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
0|main | at Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
0|main | at require (node:internal/modules/helpers:130:18)
0|main | at Object.<anonymous> (/home/user/web/domain.com/public_html/nodejs/main.js:1:16)
0|main | at Module._compile (node:internal/modules/cjs/loader:1241:14)
0|main | at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
0|main | at Module.load (node:internal/modules/cjs/loader:1091:32)
0|main | at Module._load (node:internal/modules/cjs/loader:938:12)
0|main | at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|main | at Module._compile (node:internal/modules/cjs/loader:1241:14) {
0|main | code: 'MODULE_NOT_FOUND',
0|main | requireStack: [ '/home/user/web/domain.com/public_html/nodejs/main.js' ]
0|main | }
0|main | Error: Cannot find module 'moment'
0|main | Require stack:
0|main | - /home/user/web/domain.com/public_html/nodejs/main.js
0|main | at Module._resolveFilename (node:internal/modules/cjs/loader:1048:15)
0|main | at Hook._require.Module.require (/usr/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:81:25)
0|main | at require (node:internal/modules/helpers:130:18)
0|main | at Object.<anonymous> (/home/user/web/domain.com/public_html/nodejs/main.js:1:16)
0|main | at Module._compile (node:internal/modules/cjs/loader:1241:14)
0|main | at Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
0|main | at Module.load (node:internal/modules/cjs/loader:1091:32)
0|main | at Module._load (node:internal/modules/cjs/loader:938:12)
0|main | at Object.<anonymous> (/usr/lib/node_modules/pm2/lib/ProcessContainerFork.js:33:23)
0|main | at Module._compile (node:internal/modules/cjs/loader:1241:14) {
0|main | code: 'MODULE_NOT_FOUND',
0|main | requireStack: [ '/home/user/web/domain.com/public_html/nodejs/main.js' ]
0|main | }
I already fixed it
The status is now online even after rebooting.
But notifications still do not arrive, nor do messages from one person to another in the chat.
Also, I opened the ports in Hestia
I also see the following error when reading the error log:
PM2 | 2023-10-21T15:41:08: PM2 log: App [main:1] online
/root/.pm2/logs/main-out.log last 15 lines:
/root/.pm2/logs/pm2-sysmonit-out.log last 15 lines:
/root/.pm2/logs/pm2-sysmonit-error.log last 15 lines:
/root/.pm2/logs/main-error.log last 15 lines:
1|main | syscall: 'read',
1|main | code: 'EISDIR'
1|main | }
1|main | Error: EISDIR: illegal operation on a directory, read
1|main | at Object.readSync (node:fs:735:3)
1|main | at tryReadSync (node:fs:420:20)
1|main | at Object.readFileSync (node:fs:471:19)
1|main | at loadConfig (/home/user/web/domain.com/public_html/nodejs/main.js:50:15)
1|main | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
1|main | at async init (/home/user/web/domain.com/public_html/nodejs/main.js:121:3)
1|main | at async main (/home/user/web/domain.com/public_html/nodejs/main.js:128:3) {
1|main | errno: -21,
1|main | syscall: 'read',
1|main | code: 'EISDIR'
1|main | }
Yes, the problem has been fixed by creating a folder and copying the SSL certificate files to it:
/home/$user/web/hatssl/$user.com.key
Is there a way to grant the account access to the main folder of the SSL certificate?
/home/$user/conf/web/$domain/ssl
The SSL certificate will no longer be valid after 3 months and its files must be replaced.
Buenas noches, me alegro que halla resuelto el tema del script “Wowonder” a mi me fascina.
Usted lo utiliza con nginx como servidor solamente o con apache2 de servidor web y nginx de proxy inverso (aparte de NodeJS para ambos la mensajerĂa como vĂ).
Si lo utiliza con nginx de servidor web podrĂas compartir el archivo de configuraciĂłn del script, yo aĂşn no he podido ponerlo a trabajar…
Gracias y disculpe la molestia…
Please note: that these settings allowed chat to run in the script, but messages and notifications do not arrive in real time. I am now in the process of contacting developer support for the script to find out the reason behind this.
Hope this helps, If you need more assistance, do not hesitate to ask.