Applicable to:
- Plesk for Windows
Symptoms
When using DELETE, PUT or PATCH HTTP methods with .php files or Web API, the following error message appears in a web-browser:
PLESK_INFO: 405 - HTTP verb used to access this page is not allowed
The page you are looking for cannot be displayed because an invalid method (HTTP verb) was used to attempt access
Cause
HTTP verb which is being used is not registered for a particular handler/file extension.
Resolution
-
Connect to the Plesk server via RDP.
-
Launch Internet Information Service (IIS) Manager at Windows Start > All Programs > Windows Administrative Tools.
-
In IIS Manager, expand SERVERNAME > Sites > click example.com > Handler Mappings (under IIS).
-
Find the handler which is used by the website and double-click on it.
For example, if this is a PHP website, double-click on PHP-php.
-
Click Request Restrictions....
-
Switch to the Verbs tab.
-
Add required verbs in to the verbs field, for example:
CONFIG_TEXT: GET,HEAD,POST,PUT,DELETE,PATCH
-
Click OK to apply the changes in both windows.
Note: If you get the warning "The specified executable for the handler must be a .dll or .exe file", that means the path in the Executable (optional) field contains spaces. In this case, use double quotation marks to specify the executable, for example:
"C:\Program Files (x86)\Plesk\Additional\PleskPHP74\php-cgi.exe"|-d siteId=10
Video instructions
Comments
9 comments
how to use this on an ubuntu server?
I already enabled the apache module "allowmethods" and added
<Location "/">
AllowMethods GET POST OPTIONS DELETE PUT
Require all granted
</Location>
to my .htaccess. now I'm getting a HTTP 500
Hello @Adrian Schnell.
As I can see you have submitted a ticket to Plesk Technical Support in regards to the issue mentioned.
A reply was sent to you already.
Thank you! This was my issue however there I needed to disable WebDAV implicitly in the web.config even though it was not enabled!
<modules>
<remove name="WebDAVModule"/>
</modules>
<handlers accessPolicy="Read, Execute, Script">
<remove name="WebDAV" />
</handlers>
Hello @Alon Berman,
Yes, seems in your particular case there was a conflict between WebDAV and .NET Core IIS handlers
Glad to see that you figured it out!
Suppose others can find this solution useful!
Ive tried this but it seems its still not working for me, is there any other method i could try ?
Hello @RuschGaming
Please submit a ticket to investigate the issue further https://support.plesk.com/hc/en-us/articles/213608509-How-to-submit-a-request-to-Plesk-support-
Hello @RuschGaming
Let's put this into our web.config file under <configuration> and <system.webServer>
or
How do we accomplish this on Plesk for Linux?
Please sign in to leave a comment.