Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when setting HTTPS #5

Open
nesjett opened this issue Oct 29, 2018 · 4 comments
Open

Error when setting HTTPS #5

nesjett opened this issue Oct 29, 2018 · 4 comments

Comments

@nesjett
Copy link

nesjett commented Oct 29, 2018

Node doesnt starts when setting scheme to 'https'

@lonalore
Copy link
Owner

That's very little information. Can you provide me more details? URL for your website, errors on console etc...

@nesjett
Copy link
Author

nesjett commented Oct 29, 2018

Sorry, I just wanted to know if it´s a known issue.

Config:
scheme: 'https', port: 8000, host: 'domain', resource: '/socket.io', serviceKey: '', backend: { port: 80, host: 'domain', scheme: 'https', basePath: '', // If your e107 is in a subfolder, use this syntax: /my_folder messagePath: '/e107_plugins/nodejs/nodejs.php' . . .

Console error:
`
fs.js:667
return binding.open(pathModule.toNamespacedPath(path),
^

Error: ENOENT: no such file or directory, open ''
at Object.fs.openSync (fs.js:667:18)
at Object.fs.readFileSync (fs.js:572:33)
at Object. (/var/www/vhosts/domain/httpdocs/e107_plugins/nodejs/server.js:1548:11)
at Module._compile (module.js:649:30)
at Object.Module._extensions..js (module.js:660:10)
at Module.load (module.js:561:32)
at tryModuleLoad (module.js:501:12)
at Function.Module._load (module.js:493:3)
at Function.Module.runMain (module.js:690:10)
at startup (bootstrap_node.js:194:16)
`

@lonalore
Copy link
Owner

You should also provide .key, .crt and .bundle files for your SSL, like:

sslKeyPath: '/var/www/clients/client2/web2/ssl/e107hungary.org-le.key',
sslCertPath: '/var/www/clients/client2/web2/ssl/e107hungary.org-le.crt',
sslCAPath: '/var/www/clients/client2/web2/ssl/e107hungary.org-le.bundle',

@nesjett
Copy link
Author

nesjett commented Oct 29, 2018

Thank you, I missed this part, only forced redirection to https.

Anyway I´m not confortable with certs at all, Ive copied the cert keys into files with the right extension and configured it, but its not working at all (works partially)

Some things works, like node chatbox, but PM (that worked right in http mode) is not working now. I get some errors on login to, like:

Error with authenticate client request: { Error: write EPROTO 140335337731904:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:827:

at WriteWrap.afterWrite [as oncomplete] (net.js:844:14) errno: 'EPROTO', code: 'EPROTO', syscall: 'write' }

getNodejsSessionIdsFromUid { uid: undefined,
sessionIds:
[ 'K_dlxHbuDh8giVJ_AAAA',

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants