如何在谷歌云服务器或AWS上运行php websoket服务器文件(server.php)

I have setup my php websocket application on google cloud and i have test it using cloud shell and putty terminal after running my server.php file but i want to run this file permanently so I am unable to do this.So please help me about it.

We can talk about two options:

The App Engine for standard or flex, but the websockets has limitations for php.

The second option is Compute Engine, we have to prepare the environment (apache), and assign the Public IP.

Please check the next links:

https://cloud.google.com/community/tutorials/setting-up-lamp

http://socketo.me/docs/hello-world