How to use ssl with mooChat

In group: mooChat - mooSocial's Live Chat

Similar to http we can use https . The major difference is that we need to supply a key if we want to publish a chat server .

You can configure it in the file mooSite/lib/MooNodeJsServer/mooServer.js . Find the code  bellow :

and change it like the code bellow :

Notice that you need to supply the right key / certificate for the lines :

var privateKey = fs.readFileSync( 'privatekey.pem' );
var certificate = fs.readFileSync( 'certificate.pem' );

A sample implementation could look as follows.

 

var privateKey = fs.readFileSync( '/home/sitename/ssl/keys/private.key' );

var certificate = fs.readFileSync( '/home/sitename/ssl/certs/yousite.crt' );

After that , you need to restart chat server then it is ready as https://yoursite.com:3000

Posted in on 01/15/17 at 00:01
Comments (1)
No login
Login or register to post your comment
Cookies on mooCommunity - Social Networking Script.
This site uses cookies to store your information on your computer.