How do I solve Error 405 method not allowed ?
I am running nginx and I have tried different methods to post data from my contact us html form to my email and its always failing stating that the method is not allowed.
1 Reply
CassandraD
Linode Staff
I'm not familiar with this particular error, but according to this discussion on ServerFault, it means the contact form's code doesn't allow PUT requests.
I found a StackOverflow forum that points to what sounds like the easiest solution, though I haven't tested it myself. It suggests updating your NGINX configuration file to allow POST, and links to a GitHub with further discussion about how it works and how to block other methods. That fix of updating the NGINX configuration file with "error_page 405 =200 $uri" seems to be confirmed on this post as well.