Nginx listens to port 80, I want Nginx not to process it when I request for example.com/tophp , but pass it on to the PHP console application (CLI).
Those. php should also listen, probably, port 80, somehow through sockets (I, in general, in this thread do not know anything).
Maybe some kind of proxying is done on Nginx, a type of web server is raised on php, which listens to port 79, and nginx proxies to it. It is better, of course, that nginx does not handle the example.com/tophp port 80 at all, so that the request goes immediately to php. We'll see how it goes.
Example:
Php script works as an eternal loop, waiting for a request.
... There is a request for http://example.com/test . Nginx processes it, php script does not receive anything.
... There is a request for http://example.com/tophp . Nginx does not process it, but sends it to the PHP cli clipper. And then already in php in the endpoint loop this request is processed as I want.
Tell me, please, how is this generally implemented?