Apache限制PUT和DELETE

发布于 2024-10-02 07:43:09 字数 705 浏览 7 评论 0原文

我一直在尝试使用 标签来禁用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

淡笑忘祈一世凡恋 2024-10-09 07:43:09

http://wiki.linuxquestions.org/wiki/Securing_Apache#Disabling_PUT_and_DELETE

<Directory /usr/apache/www/myserver.com/htdocs>
    ...bunch of useful stuff
    <Limit PUT DELETE>
        Require user terribleUnguessableUsername235452309875wesaef
    </Limit>
</Directory>

根据 Apache 文档在超链接中找到我没有足够的代表来包含,您不能使用 Limit 指令来限制 TRACE。

http://wiki.linuxquestions.org/wiki/Securing_Apache#Disabling_PUT_and_DELETE

<Directory /usr/apache/www/myserver.com/htdocs>
    ...bunch of useful stuff
    <Limit PUT DELETE>
        Require user terribleUnguessableUsername235452309875wesaef
    </Limit>
</Directory>

According to Apache docs found at a hyperlink I do not have enough rep to include, you cannot restrict TRACE using a Limit directive.

债姬 2024-10-09 07:43:09

如果您无法重新启动 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 a directory, but I'm not sure.

Note that TRACE can't be limited.

莫相离 2024-10-09 07:43:09

通过在连接器标记中添加 allowTrace = false 可以在 server.xml 中限制跟踪。

Trace can be limited in server.xml by adding allowTrace = false in connector tag.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文