How does one automatically run webservice in linux?
Source: Internet
Author: User
In linux, how does one automatically run webservice? I used php as a service, and now I want to start the service through ssh. the following code is used to start the service: php & nbsp; /www/aabb/websocket/server. php. now there are two problems. 1. how does linux automatically run webservice?
I used php as a service. now I want to start the service through ssh. the following command is used to start the service: php/www/aabb/websocket/server. php, now there are two problems that follow
1. if you use ssh to start the service, will the WINDOWS computer running SSH automatically shut down if it does not work for a long time? will the service start after it is disabled, if you cannot start the service, there are many things you can't do.
2. whether the service can be written into nginx means that the service will run as long as the server is on
Please help me. this is the first time I wrote a webservice program. I thought about it yesterday and didn't think of a solution.
------ Solution --------------------
Nohup php/www/aabb/websocket/server. php &
Background execution
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.