发布于 2025-02-12 13:56:25 字数 500 浏览 0 评论 0原文

我正在尝试设置此设置: https://github.com/oprel/eprel/emanon 每次我尝试运行帖子

[Sat Jul 02 13:03:13.380647 2022]
/fs5d/9kun/public/board/.htaccess: Invalid command 'Deny', perhaps misspelled or 
defined by a module not included in the server configuration

<FilesMatch "\.(txt|pm)$">
deny from all
</FilesMatch>

但是 我应该怎么办??我用CGI运行Apache。

i'm trying to set up this: https://github.com/oprel/emanon
But everytime i try to run post.cgi i receive this error on the error log:

[Sat Jul 02 13:03:13.380647 2022]
/fs5d/9kun/public/board/.htaccess: Invalid command 'Deny', perhaps misspelled or 
defined by a module not included in the server configuration

The 'Invalid command' is from .htaccess:

<FilesMatch "\.(txt|pm)
quot;>
deny from all
</FilesMatch>

Lines 3,4,5
What should i do?? I run apache with cgi.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

段念尘 2025-02-19 13:56:25

我希望您在Apache 2.4上

 &lt; files -match“ \。(txt | pm)$”&gt;
否认所有人
&lt;/filesmatch&gt;
 

deny是Apache 2.2(及以前)指令,以前在Apache 2.4上弃用,并(从A base 模块)移动到MOD_ACCESS_COMPAT(可选扩展)。此模块可能未启用,因此错误。

您应该在Apache 2.4上使用相应的requient指令。例如:

Require all denied

参考:

I would expect you are on Apache 2.4

<FilesMatch "\.(txt|pm)
quot;>
deny from all
</FilesMatch>

Deny is an Apache 2.2 (and earlier) directive and is formerly deprecated on Apache 2.4 and moved (from a base module) to mod_access_compat (an optional extension). This module is probably not enabled, hence the error.

You should be using the corresponding Require directive on Apache 2.4 instead. For example:

Require all denied

Reference:

身边 2025-02-19 13:56:25

问题是您根本不订购该语句,因此Apache不知道您是否要拒绝或允许。在下面尝试一下...

<FilesMatch "\.(txt|pm)$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

The problem is that you are not ordering the statement at all, therefore Apache has no idea whether you want to deny or allow it. Try this below...

<FilesMatch "\.(txt|pm)
quot;>
    Order Allow,Deny
    Deny from all
</FilesMatch>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文