lundi 2 mars 2015

How to run PHP script as a background service on AWS?

Now I am trying to execute php websocket script as a background. For it, I used below command on the AWS terminal.



php chat-server.php >> log.txt &


But strangely it is terminated without any errors.


My question is two.




  1. Why the php command is terminated on AWS? Is there any limitation to run a php script continually as a background service




  2. How can I run it permanently on AWS? I understand I can use a linux script to run my web-socket server permantely (maybe linux script will be re-lunch my php script when it will be terminated). But I don't know well linux commands. Who can help me?




Thanks for your advice!





Aucun commentaire:

Enregistrer un commentaire