Question

Method not allowed. Must be one of: POST (I am using LAMP)

Posted April 5, 2016 9.6k views
LAMP Stack

Hi,

First of all, let me tell you that this isn’t a 405 Method Not Allowed error. The message in the subject is the message I get when I try to access to my droplet from my browser. What is weird is that the POST request works when I send it from Chrome’s Advanced Rest Client Application…
Can someone please tell me how to solve this problem?

Thank you very much!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

What software are you running on this server? Is this a static page you are trying to reach? If this is not a 405 error (which would indicate a configuration issue) I would recommend checking your apache error log to see if a script is encountering a problem, causing this message.

  • Thank you for your response.
    I am using PHP files and making RESTful calls based on Slim Framework.
    Where can I see the Apache error log?

    • It will be located in /var/log/apache2/error.log if you are on Ubuntu or Debian and /var/log/httpd/error.log if you are on CentOS or Fedora.

      • I am sorry I didn’t respond to your previous question: I am using Ubuntu.

        Actually, I found nothing about the not allowed POST method… It is very weird actually because I can do the request from the chrome rest client (the application in chrome extensions) but I cannot do it from my browser, and when I try to connect from Android Studio, the connection is refused…

        • When you attempt to access this from a browser are you doing it from a form request? Otherwise, simply adding the url and variables in the address bar will pass the data but will do so as a GET and not a POST request.

Submit an Answer