natanael1008
New member
- Oct 27, 2022
- 0
- 1
- 0
Awesome! Thanks a million.Here are the instructions but I haven't figured it out yet either
NODEJS : for who has problem with nodejs and SSL cetificates :
- after follow the official wowonder guide to install nodejs follow this - assuming your site running on HTTPS with ( let’encrytp sll certbot)
—- STOP FEREVER PROCESS - 1) running on terminal : sudo forever stopall
—-ENABLE NODEJS IN ADMIN PANEL 2) in admin panel enabled nodejs and enable ssl on port 449
3) path to keys :
/etc/letsencrypt/live/mydomain.com/privkey.pem
/etc/letsencrypt/live/mydomain.com/cert.pem
4) save
— RESTART FOREVER AND NODE APP
5) back to terminal and run :
cd /var/www/yourdomain.com/
cd ./nodejs && forever start ./main.js
—-—--IF YOUR NOT RUNNING LET’S ENCRYPT YOU CAN GENERATE A SELF SIGNED CERTIFICATE WTH OPENSSL --—-—-—-——-
From Terminal
1) cd /var/www/yourdomain.com
——CREATE SSL FOLDER
2) sudo mkdir SSL
—- GRANT PERMISSION TO SSL
3) sudo chown -R www-data:www-data SSL ( if runnn on apache ) 4) sudo chmod -R 775 SSL
—- GENERATE KEY WITH OPEN SSL
1) openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365
New path to key to put in admin panel will be :
/var/www/mydomain.com/SSL/key.pem
/var/www/mydomain.com/SSL/cert.pem
Every modification and operation always remember :
—- STOP FEREVER PROCESS - 1) running on terminal : sudo forever stopall
— RESTART FOREVER AND NODE APP
5) back to terminal and run :
cd /var/www/yourdomain.com/
cd ./nodejs && forever start ./main.js
Good Luck
I use shared hosting on NameCheap and apparently, I can't access the root directory. I spoke to support and NodeJS is installed and turned on automatically on the server, but I can't access the root directory to get the key directories.
So currently, I turned on the NodeJS setting on my script using only the HTTP port and the Redis server port; and there is an obvious improvement in my website speed, which is even more visible in the Combined Android App I used with the website, so much faster and smoother.
The only drawback is I don't know the security implications of running on HTTP ports and not the SSL port (If you do please share). So for now I'll still be on the NodeJS with HTTP until I can switch Hosting. (You can try that too it if works for you)
On Namecheap I didn't have to run any code to install Node or Forever, I just input the ports and viola it worked.