Guide to Config the Node Push running over HTTPS (SSL) Protocol

  • This is an easy way to RUN your Push Node Notification Server over Https (SSL) Connection.
    Just follow the next steps and you will be Fine.

    First of all go to your installation directory (Full Path)
    example => /var/www/vhosts/your_domain_folder/wcf/acp/be.bastelstu.wcf.nodePush
    Create a folder named Keys
    find and copy the cert_pem keys from your server in keys directory
    Give on keys folder the correct owner and group (the same with your domain folder) by using chown -hR owner:group command

    Now open the file with an editor
    Find the app = do express in this file and paste the next code after it..

    privateKey = fs.readFileSync( './keys/your_privatekey_pem' ) 
    certificate = fs.readFileSync( './keys/your_certificate_pem' )
    cakey = fs.readFileSync( './keys/your_ca_pem' )
    options = {key: privateKey, cert: certificate, ca: cakey}

    Then find server = (require 'http').Server app and replace it with server = (require 'https').createServer options, app

    In your config file use the next settings...

    Now you are ready to start your node using npm start command

    In your WBB4 ACP goto System => Options => General => System tab
    and replace the Push Server Host (nodePush) with https://your_domain_name:9001
    and Message Address with unix://{WCF_DIR}acp/be.bastelstu.wcf.nodePush/tmp/inbound.sock (default value)

    Now you can test if the node is accessible by your browser "https://your_domain:9001"

    Thats all guys !!!! :thumbup: