.htaccess允许/拒绝ip使用require apache 2.4

编程入门 行业动态 更新时间:2024-10-23 20:16:28
本文介绍了.htaccess允许/拒绝ip使用require apache 2.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的托管服务提供商最近将服务器更新为Apache 2.4,并且使用以下代码控制通过.htacces文件访问特定文件夹的规则不再起作用:

My hosting provider recently updated the server to Apache 2.4 and the rules to control access to a specific folder via .htacces file doesn't work anymore with this code:

Order Deny,Allow Deny from All Allow from 123.123.123.123 Allow from 123.123.123.123 Allow from 123.123.123.123

阅读Apache 2.4文档后,我知道我应该改用这样的东西:

After reading Apache 2.4 documentation I understand i should use something like this instead:

<RequireAny> Require ip 123.123.123.123 Require ip 123.123.123.123 Require ip 123.123.123.123 </RequireAny>

,但是它不起作用。谁能帮助我解决这个问题?谢谢!

but it doesn't work. Any one who can help me figuring this out? Thank you!

推荐答案

对于2.4,现在看起来像这样:

For 2.4 it now looks something like this:

<RequireAll> Require all denied Require ip 123.123.123.123 Require ip 123.123.123.123 Require ip 123.123.123.123 </RequireAll>

编辑:

Require ip 123.123.123.123 Require ip 123.123.123.123

一个文档描述对现有Apache HTTP Server用户至关重要的信息。

A document describing information critical to existing Apache HTTP Server users.

httpd.apache/docs/trunk/upgrading.html

更多推荐

.htaccess允许/拒绝ip使用require apache 2.4

本文发布于:2023-11-01 23:15:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550691.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:ip   htaccess   require   apache

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!