Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is: https://staging.wonderkids.club
I ran this command: I created a websocket server using Ratchet PHP. It is using 8443 port. All the firewall permissions are there for the port since I can establish a connection using the ws:// protocol but the connection is not being established using the wss:// protocol. I have even given the file paths of the ssl certificates and the private key and still ws is working but not wss.
It produced this output: Connection of ws:// is made but not wss://.
My web server is (include version): Apache
The operating system my web server runs on is (include version): AlmaLinux 8.9
My hosting provider, if applicable, is: Hostinger
I can login to a root shell on my machine (yes or no, or I don't know): Yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): Yes
The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot): certbot 1.22.0
If the wss speak of is this one "6602 Yes Microsoft Windows WSS Communication",
so that would be on Port 6602 which looks filtered.
$ nmap -Pn -p6602 staging.wonderkids.club
Starting Nmap 7.94SVN ( https://nmap.org ) at 2023-12-28 15:39 PST
Nmap scan report for staging.wonderkids.club (62.72.30.61)
Host is up (0.27s latency).
PORT STATE SERVICE
6602/tcp filtered wsscomfrmwk
Nmap done: 1 IP address (1 host up) scanned in 0.78 seconds
If I had to guess [which I have no other alternative] ...
I'd say that you've attached HTTP/WS to port 8443.
And then tried to also attach HTTPS/WSS to port 8443.
It can't do both.
$ nmap -Pn -p80,443,6602,8443 staging.wonderkids.club
Starting Nmap 7.94SVN ( https://nmap.org ) at 2023-12-28 15:46 PST
Nmap scan report for staging.wonderkids.club (62.72.30.61)
Host is up (0.28s latency).
PORT STATE SERVICE
80/tcp open http
443/tcp open https
6602/tcp filtered wsscomfrmwk
8443/tcp open https-alt
Nmap done: 1 IP address (1 host up) scanned in 0.59 seconds
Thx Bruce & Rudy for the prompt response, after trying whole night, we've just packed for the day. Will get back with the result on all the action points as suggested by you both by tonight (IST).
Thx again.
The fact ws:// works, but wss:// doesn't tells me you didn't configure the certificate (properly) for your WebSocket service. Unfortunately, the only information to go with, is that you did so using "Ratchet PHP using port 8443". There is no information about HOW you actually did that and HOW the certificate comes into play. Simply configuring HTTPS on port 443 is not enough to magically make WebSockets work too
I have put proxy in the httpd.conf file but still the wss connection is not being established. In the httpd.conf file the ssl certificate paths are also given.
I thought you were asking to hit the site from the internet with WSS://
It looks like your configuring HTTPS:// from the Internet and then that web service makes an internal proxy request via WSS://
[which would NOT need to be encrypted - locally].