Enable PUT and DELETE methods on Apache 2.4

后端 未结 1 1849
半阙折子戏
半阙折子戏 2020-12-18 08:01

I\'d like to enable on my Apache 2.4 under linux the PUT and DELETE methods. When clients try to invoke such methods I get a \"405 Method Not Allowed\" as answer.

On

相关标签:
1条回答
  • 2020-12-18 08:36

    Try the following changes on your server:

    Open "/etc/httpd/conf/httpd.conf" and look for the following blocks:

    <Limit GET POST OPTIONS PROPFIND>
      Order allow,deny Allow from all
    </Limit>
    <LimitExcept GET POST OPTIONS PROPFIND>
       Order deny,allow Deny from all
    </LimitExcept>
    

    Then just add PUT and DELETE after PROPFIND. Then Restart httpd by "/sbin/service httpd restart" or service httpd restart.

    Note: In some servers , mostly the ones with a control panel (DA,cPanel,..) you may change this file :/etc/httpd/conf/extra/httpd-directories.conf

    I hope it solves your problem.

    0 讨论(0)
提交回复
热议问题