Apache限制PUT和DELETE
我一直在尝试使用
标签来禁用 PUT 和 DELETE 调用通过我们的 Apache 服务器执行,但没有成功。
Apache 版本:2.2
我目前正在将类似的内容添加到我的 httpd.conf 文件内部:
<Directory />
Options none
AllowOverride none
Order deny,allow
Deny from all
<Limit PUT DELETE TRACE>
Order deny,allow
Deny from all
</Limit>
</Directory>
但是当此行位于文件中时,我无法在 Apache 上成功重新启动。现在,我对 Apache 知之甚少,我一直在尝试遵循我找到的一些 Apache 文档,但没有成功。
如果我没有进行任何更改,httpd.conf 的这一部分看起来像这样:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
任何帮助将不胜感激。
I've been trying to use a <limit>
tag to disable PUT and DELETE calls from being executed through our Apache server and have been unsuccessful.
Apache Version: 2.2
I am currently adding something like this to the inside of my httpd.conf file:
<Directory />
Options none
AllowOverride none
Order deny,allow
Deny from all
<Limit PUT DELETE TRACE>
Order deny,allow
Deny from all
</Limit>
</Directory>
But I have been unable to get a successful restart on Apache while this line is in the file. Now, I know very little about Apache and I've been trying to follow along in some of the Apache docs I've found but have been unsuccessful.
With none of my changes this section of the httpd.conf looks like this:
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
http://wiki.linuxquestions.org/wiki/Securing_Apache#Disabling_PUT_and_DELETE
根据 Apache 文档在超链接中找到我没有足够的代表来包含,您不能使用 Limit 指令来限制 TRACE。
http://wiki.linuxquestions.org/wiki/Securing_Apache#Disabling_PUT_and_DELETE
According to Apache docs found at a hyperlink I do not have enough rep to include, you cannot restrict TRACE using a Limit directive.
如果您无法重新启动 Apache,错误日志中将会有一行告诉您问题所在。
也就是说,我认为
目录
内不允许有限制
,但我不确定。请注意,TRACE 不能受到限制。
If you can't restart Apache, there will be a line in the error log telling you what the problem is.
That said, I think a
limit
is not allowed inside adirectory
, but I'm not sure.Note that TRACE can't be limited.
通过在连接器标记中添加
allowTrace = false
可以在server.xml
中限制跟踪。Trace can be limited in
server.xml
by addingallowTrace = false
in connector tag.