Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
New on LowEndTalk? Please Register and read our Community Rules.

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

comXyzcomXyz Member
edited December 2024 in Help

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

Sign In or Register to comment.