I tried setting up some mod_proxy methods (link below) but when active, it gives me a Service Unavailable message, (sorry, not a server/sysadmin guy)
We have a development server without any SSL and it works perfectly.
Our code so far (nodejs/server.js):
var app = require("express")();
var https = require("https");
var io = require("socket.io")(https);
var port = 3000;
var privateKey = fs.readFileSync('/etc/apache2/ssl-certificate/site.key', 'utf8'); // change with your ssl .key file
var certificate = fs.readFileSync('/etc/apache2/ssl-certificate/site.crt', 'utf8'); // change with your ssl .crt file
option = {
key: privateKey,
cert: certificate
}
io.on("connection", function (socket) {
socket.on("message", function (data) {
console.log("message Recieved: " + JSON.stringify(data));
io.emit("conversation:" + data.conversation_id, data);
});
socket.on("chat_attachment", function (data) {
console.log("message Recieved: " + JSON.stringify(data));
io.emit("conversation:" + data.conversation_id, data);
});
});
https.createServer(option, app).listen(port, '0.0.0.0', function () {
console.log("Listening on Port " + port);
});
Same code but without SSL config, works over our dev server with normal HTTP.
I tried to follow recommendations at: