In recent days, some readers have come across a 405 error message in Apache. This problem can occur due to many factors. Now we will discuss them. The 405 Method Not Allowed error occurs when the web server is configured so that you can no longer perform certain actions with a specific URL. This is an HTTP response status code, also commonly referred to as the server request method, but of course not supported by the target resource.
I recently noticed that if I make a PUT request from Apache to a file or directory that doesn’t exist, I get a 405 Not Method Allowed error instead of a 404 Not Found use error. I wonder why?
curl to -i PUT -x -d "http://server/doesNotExist '"var":"val"'.htm"
HTTP/1.1 method 405 not allowedDate 12: Sat, Dec. 2017 03:31:18 Apache/2 gmtserver:.2.(CentOS)Allow: 15,316Connection: content: get,head,post,options,tracelength closeContent type: text/html; Encoding = iso-8859-1