403执行PUT请求时 [英] 403 when performing PUT request

查看:172
本文介绍了403执行PUT请求时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对apache配置非常陌生,正在尝试了解更多信息.发出PUT请求时得到403 - Forbidden,但是对相同URL的GET可以正常工作.

I am very new to apache configurations and am trying to learn more. I am getting a 403 - Forbidden when making a PUT request, however a GET to the same URL works fine.

是否需要启用某些内容以允许PUT请求?

Is there something I need to enable to allow PUT requests?

我正在使用Apache和PHP

I am using Apache and PHP

推荐答案

如果您使用的是Apache 2.4.x,则错误或丢失"Require"指令可能会导致403.

If you are working with Apache 2.4.x, a faulty or missing "Require" directive could the cause of the 403.

在virtualhost配置的<Directory>块或.htaccess文件中,添加以下行:

In the <Directory> block of your virtualhost config, or your .htaccess file add the following line:

Require all granted

有关"Require"语法的详细信息,请参见: https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require

For details on the "Require" syntax see: https://httpd.apache.org/docs/2.4/mod/mod_authz_core.html#require

这篇关于403执行PUT请求时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆