Publishing websockets to be used with domains

I have a web app that uses laravel/react. I needed websockets for some runtime data transport and I used them in my application. I can connect my websocket server using ws://server_ip:port combination. But I have also a domain and I want to use the facalities of my domain, so I want to connect my server with ws://my_domain:port combination but I can’t for some reason. I looked at CloudFlare settings, nginx configurations etc. nothing is worked. Can somebody tell which steps should be done for binding a websocket server to a domain which points to that server?