What do I do about my server?

I want to know why and what to do to my server because anytime I make a request that is not GET or POST the returns method not allowed. I have Restarted the server from the beginning but it still do the same thing. I need an idea of what to do and my server is using Almalinux 8 Disk. And also if I use another server the try it everything works fine.

1 Reply

Are you encountering this issue when using our platform API to interact with your Linodes/account or the exposed API of a specific application? Do you have any examples of the API calls you are making (as well as output messages/errors) or can you provide any insight into your use-case, server configuration, etc?

HTTP 405 "Method Not Allowed" is a fairly straight-forward error - the server receives and understand the request, but the target endpoint/application does not accept the designated API method (PUT, GET, POST, PULL, or DELETE).


For example, I tested the following platform API calls to determine the availability of services in our Newark, NJ data center:

GET (correct method):

curl --request GET \
     --url https://api.linode.com/v4/account/availability/us-east \
     --header 'accept: application/json' \
     --header "authorization: Bearer $TOKEN"

# Output:
{
  "region": "us-east",
  "available": [
    "Linodes",
    "NodeBalancers",
    "Block Storage",
    "Kubernetes"
  ],
  "unavailable": []
}

PULL (incorrect method):

curl --request PULL \
     --url https://api.linode.com/v4/account/availability/us-east \
     --header 'accept: application/json' \
     --header "authorization: Bearer $TOKEN"

# Output:
<TITLE>Bad Request</TITLE>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.

In this example, our v.4 API endpoint /account/availability/us-east only accepts the GET method, so all other methods will result in that error.


Receiving this error for an application is a bit different since you will feasibly have control over the acceptable methods, assuming you created the endpoint. For an application like Laravel, you will need to review and modify your PHP routes to ensure that you are exposing endpoints with the necessary API methods.

Personally, I am not familiar with that type of configuration, but I was able to find the following documentation on the Laravel community and on forums such as StackOverflow:

Laravel Documentation:

StackOverflow Forum:

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