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

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct