I have followed the instructions to create a simple nodejs app on OLS https://openlitespeed.org/kb/running-node-js-apps-with-openlitespeed/
I already have a letsencript SSL certificate installed and have a website running from this server at https://petersmusic.tk
I have two questions about this. One is that the tutorial says this:
This example assumes you are using the default document root + URI: /node/
But then in the configuration it says to put the location as /usr/local/lsws/Example/node/ (replacing Example with my directory name, of course).
I thought that the document root was the html folder, from where the server serves files if you type example.com in the address bar by itself. Is this a mistake in the tutorial? Should this say something else? I am assuming that the app.js file should go in /usr/local/lsws/Example/node/ and that that is also the same path that goes in the Location box.
The other question is this:
The instructions say to go to http://Server_IP : port/node/ to make the app.js script run. I have replaced the IP address with my domain name: petersmusic.tk:3000/node
but the server stalls and then the browser says "Unable to connect." Using my IP as the tutorial suggests has the same result.
Given that I already have a domain and the https set up, should I use a different URL from the tutorial? I have tried changing http to https in the app.js script, but that does not help.
I already have a letsencript SSL certificate installed and have a website running from this server at https://petersmusic.tk
I have two questions about this. One is that the tutorial says this:
This example assumes you are using the default document root + URI: /node/
But then in the configuration it says to put the location as /usr/local/lsws/Example/node/ (replacing Example with my directory name, of course).
I thought that the document root was the html folder, from where the server serves files if you type example.com in the address bar by itself. Is this a mistake in the tutorial? Should this say something else? I am assuming that the app.js file should go in /usr/local/lsws/Example/node/ and that that is also the same path that goes in the Location box.
The other question is this:
The instructions say to go to http://Server_IP : port/node/ to make the app.js script run. I have replaced the IP address with my domain name: petersmusic.tk:3000/node
but the server stalls and then the browser says "Unable to connect." Using my IP as the tutorial suggests has the same result.
Given that I already have a domain and the https set up, should I use a different URL from the tutorial? I have tried changing http to https in the app.js script, but that does not help.
Last edited: