I'm trying to switch between nginx and openresty with php using exec.
I use this to switch to openresty, exec('/bin/systemctl stop nginx ; /usr/local/openresty/nginx/sbin/nginx -p /usr/local/openresty/nginx');
and this exec('/usr/local/openresty/nginx/sbin/nginx -s stop ; /bin/systemctl start nginx'); to switch to nginx.
Both work from ssh, however, from php I am unable to start nginx. This /bin/systemctl start nginx does not appear to execute. I tried executing the code from .sh files instead but that didn't work.
from Problem switching between openresty and niginx
No comments:
Post a Comment