Closed mehrab-wj closed 2 years ago
Ok, so I found out that the problem was even though I was using Nginx as a reverse proxy and my Nginx was handling SSL by itself, I've also filled LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT
and LARAVEL_WEBSOCKETS_SSL_LOCAL_PK
in my environment file that causes the problem.
So if you are using Nginx as a reverse proxy, after making sure that the port is open on your container, just let Nginx handle the SSL and don't configure it again on this package.
Ok, so I found out that the problem was even though I was using Nginx as a reverse proxy and my Nginx was handling SSL by itself, I've also filled
LARAVEL_WEBSOCKETS_SSL_LOCAL_CERT
andLARAVEL_WEBSOCKETS_SSL_LOCAL_PK
in my environment file that causes the problem.So if you are using Nginx as a reverse proxy, after making sure that the port is open on your container, just let Nginx handle the SSL and don't configure it again on this package.
Hi, can you add the part where you have solved it, what file you touched or where you placed the certificate, I have had the same problem using nginx-proxy (https://hub.docker.com/r/jwilder/nginx-proxy). I also use docker compose. Thanks
Hi @ssheduardo, I don't know what is your problem exactly, but what I've done was use the Nginx image and configure the reverse proxy by myself. Then I used CDN so the CDN would handle the SSL and I just have to enable SSL in my Nginx by just creating a self-signed certificate. when you do configure your Nginx correctly, no changes are needed in the package and you could connect to it through your reverse proxy.
Hi @ssheduardo, I don't know what is your problem exactly, but what I've done was use the Nginx image and configure the reverse proxy by myself. Then I used CDN so the CDN would handle the SSL and I just have to enable SSL in my Nginx by just creating a self-signed certificate. when you do configure your Nginx correctly, no changes are needed in the package and you could connect to it through your reverse proxy.
This is my issues: https://github.com/beyondcode/laravel-websockets/issues/986
Hi @ssheduardo, I don't know what is your problem exactly, but what I've done was use the Nginx image and configure the reverse proxy by myself. Then I used CDN so the CDN would handle the SSL and I just have to enable SSL in my Nginx by just creating a self-signed certificate. when you do configure your Nginx correctly, no changes are needed in the package and you could connect to it through your reverse proxy.
You didn't create a Docker container for websockets? I don't see it in your docker-compose.yml file.
Hi, I've set up my project based on docker and docker-compose, I've exposed the port 6001, which is the port for running the WebSocket as default, and configured Nginx based on the documentation, but when I try to connect to my WS server, I get this error:
Also, another weird problem is now I can't even connect to my WS server using direct IP and port.
Nginx config file:
Broadcasting config:
broadcasting.php
Websocet config:
websockets.php
Docker compose file:
docker-compose.yml