Docker nginx swoole reverse proxy

I, a docker running nginx and a docker running php7.2
I ran the swoole websocket service in php72 docker. I can work through 127.0.0.1 br 9501
but when I configure proxy 9501 in nginx.conf, as long as I am a proxy nginx, I will hang up whether I am a proxy or not. I only need an agent to restart the docker-compose service and cannot access it! I don"t understand why!
I switch to the virtual machine, and there is nothing wrong with the nginx agent without docker! I don"t know anything!
have any partners ever messed with docker-compose websocket

Aug.17,2021

exec enters nginx, and executes nginx-t to see if it passes.

and you can use docker logs CONTAINER to view the container log to determine where it went wrong

and two service need to be in the same network, or php need depends_on to nginx service

Menu