Apache Web Server 2.4 限制瀏覽來源 IP

建立設定檔
# vim /etc/httpd/conf.d/base.conf
Alias /base /var/www/base
<Directory /var/www/base/>
Order Deny,Allow
# 2.2
#Deny from all
#Allow from 192.168.1.0/24
# 2.4
Require all denied
Require ip 192.168.1.0/24
</Directory>

重新啟動 Web Server
# systemctl restart httpd

檢查是否有正常啟動
# system status httpd