Hi All

We test this module with normal http and it works fine for us.
Now we want to running this service under https, because the main page is only running under https.

I read a lot on other requests or on other posts, but does not find any help for me.

If we are running the service under https, we need a signed certificate? right? can we use the same certificate as on the main page?

settings = {
    scheme: 'https',
    port: 8080,
    host: 'www.domain.com',
    resource: '/socket.io',
    sslKeyPath:"/home/cert/server.key", //server key
    sslCertPath:"/home/cert/server.crt",  //server cert
    serviceKey: '',
    backend: {
        port: 443,
        host: 'www.domain.com',
        scheme: 'https',
        basePath: '',
        messagePath: '/nodejs/message'
    },
    debug: true,
    sslCAPath: '',
    ...
    ...
    ...
}

the sslkeypath is right now a self signet certificate, but it does not works... the client cannot connect to the server.

can anybody help us, how we have to setup and what we have to do on ssl?

thank you for your help

Comments

cola created an issue. See original summary.

Anonymous’s picture

For self-signed certificates, you can try adding the following to your server.js right before var io = require('socket.io')(server, io_options);:

process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0" // Avoids DEPTH_ZERO_SELF_SIGNED_CERT error for self-signed certs

I haven't tested this, but it is what I have used on other node.js projects for self-signed certificates.

cola’s picture

thank you for your answer.

right now our sysadmin create a signed certificate, with this the nodejs server running fine.

next time i try with your parameters

cola’s picture

Status: Active » Closed (fixed)