title: HTML button launch Shell script
body: <p>Working with:</p>
  
  <ul>
  <li>Linux Debian</li>
  <li>Lighttpd Server</li>
  <li>PHP7.0</li>
  </ul>
  
  <p>I want to launch some shell scripts pressing HTML buttons.
  All the files are placed in /var/www/html
  The rights are done by:</p>
  
  <pre><code>sudo chown www-data:www-data /var/www/
  </code></pre>
  
  <p>So, I wrote some code:</p>
  
  <p>HTML test code (index.html):</p>
  
  <pre><code>&lt;form action="openApp.php"&gt;
      &lt;input type="submit" value="Open Script"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>PHP test code (openApp.php):</p>
  
  <pre><code>&lt;?php
      exec('nautilus');
      header('Location: http://localhost/index.html?success=true');
  ?&gt;
  </code></pre>
  
  <p>But no luck, nothing is working.</p>
  
  <p>Also, my Lighttpd configuration file is like that:</p>
  
  <blockquote>
    <p>server.modules = (
        "mod_access",
        "mod_alias",
        "mod_compress",
        "mod_fastcgi",
        "mod_redirect",
    )</p>
  </blockquote>
  
  <p>May be I am wrong with that piece of code.
  Do I need some Javascript to do the job ?
  May be the rights are wrong ?</p>
  
  <p>Could you help me please ? I am stuck with that.</p>