title: How to enable and use HTTP PUT and DELETE with Apache2 and PHP?
body: <p>It should be so simple. I've followed every tutorial and forum I could find, yet I can't get it to work. I simply want to build a RESTful API in PHP on Apache2.</p>
  
  <p>In my VirtualHost directive I say:</p>
  
  <pre><code>&lt;Directory /&gt;
      AllowOverride All
      &lt;Limit GET HEAD POST PUT DELETE OPTIONS&gt;
          Order Allow,Deny
          Allow from all
      &lt;/Limit&gt;
  &lt;/Directory&gt;
  </code></pre>
  
  <p>Yet every PUT request I make to the server, I get 405 method not supported.</p>
  
  <p>Someone advocated using the Script directive, but since I use mod_php, as opposed to CGI, I don't see why that would work.</p>
  
  <p>People mention using WebDAV, but to me that seems like overkill. After all, I don't need DAV locking, a DAV filesystem, etc. All I want to do is pass the request on to a PHP script and handle everything myself. I only want to enable PUT and DELETE for the clean semantics.</p>