AllowOverrideでLimitを指定した場合は、IPアクセス制限を上書きできるということ。
core - Apache HTTP サーバ バージョン 2.4
もっとhttpd.confの設定
(元来、<Limit>の形式で使われる<Limit>ディレクティブからきてるとおもうけど、ちょっと書き方違うね。)
$ cd /var/www/html/access_test/access_test1/ $ cat .htaccess Order allow,deny Allow from none Deny from all $
この状態だと、

当然Forbiddenになっている。
$ curl -I http://bgstation0.com/access_test/access_test1/access1.html HTTP/1.1 403 Forbidden Date: Wed, xx --- 2021 xx:xx:xx GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16 Content-Type: text/html; charset=iso-8859-1 $
ローカルからcurlでもForbidden。

自身のIPを調べて、
$ vi .htaccess $ cat .htaccess Order deny,allow Deny from all Allow from xx.xxx.xx.xxx $
今度は自身からのリクエストのみ受け付ける。

こっちは変わらない。
$ curl http://bgstation0.com/access_test/access_test1/access1.html
<html>
<head>
<title>.htaccess</title>
</head>
<body>
<a href="http://bgstation0.com/">B.G-STATION</a>
</body>
</html>
$ curl -I http://bgstation0.com/access_test/access_test1/access1.html
HTTP/1.1 200 OK
Date: ---, xx --- 2021 xx:xx:xx GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16
Last-Modified: ---, xx --- 2021 xx:xx:xx GMT
ETag: "xx-xxxxxxxxxxxxx"
Accept-Ranges: bytes
Content-Length: 135
Content-Type: text/html; charset=UTF-8
$自身からのアクセスのみ受け付ける。
ちなみにIPを調べたのは127.0.0.1やlocalhostだと上手くいかないから。