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