All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Nodejs reverse proxy wss to ws on myw.pt direct admin web hosting
Anyone has experience hosting nodejs on direct admin cloudlinux please help me with this.
I'm trying to get a simple nodejs app working myw.pt direct admin shared hosting.
I set up a nodejs app, everything works well on ws:// connection. The problem is when expose the app, modern browsers only allow wss:// connection from https, I'm trying to reverse proxy wss to ws.
This is what chatgpt gave me, similar to what I found on internet.
I edit .htaccess file in public_html folder and add this code, it's not working.
RewriteEngine On
# WebSocket proxy
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^(.*)$ ws://localhost:3003/$1 [P,L]
# HTTP proxy
ProxyPass / http://localhost:3003/
ProxyPassReverse / http://localhost:3003/
Websocket handshake never finished, and stay at connecting state. Getting this error on browser console: "'WebSocket: Still in CONNECTING state."
Any ideas how to make it works?
Comments
if reverse proxy doesn't work, what's stopping you to setup a wss? I'm pretty sure mywpt gave free let's encrypt.
based on brief search;
doesn't seems to be possible if you only have access to your own htaccess, there's more to configure in server side, which i doubt a shared hosting provider would allow you to do it
Yes, do you have any ideas where the certs located?
dir /etc/ssl/certs <--- not there
Why do you need the certs? You can’t use them anyways, and tbh those aren’t really meant to run node.js apps anyways. You’ll have better luck with fly.io, railway, etc.
I'm just trying to make use of something idling
in the direct admin you look for 'SSL Certificates' under 'Account Manager', both private key and the certificate should be over there
I see the list of domains, but not the certs location
https://evo.site-helper.com/evo/users/ssl.html