带有黑名单的apache2中的禁止消息

时间:2019-06-21 10:47:58

标签: apache2 blacklist

我正在测试黑白名单,但遇到了麻烦。 Apache2显示禁止消息

这是我的VirtualHost

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
        <Location />
    Order allow,deny
    allow from [MY IP]
    deny from all
    Require all granted
        Include conf/IP_my_list.conf
        </Location>
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost> ```

IP_my_list.conf is just another list of IPs that i want to enable, but they are not important.

---IP_my_list.conf ---

要求IP [我的IP]


When i do a2ensite [config file] it's ok

```$ apachectl configtest
Syntax OK

但是,当我重新加载apache2并尝试通过Web浏览器访问时(以Firefox为例),Firefox向我显示了followinf禁止消息:


You don't have permission to access / on this server.```

I don't think that i could be a problem of permissions, because if i comment this lines in virtualhost, everything is ok.

Do you have any advice regarding this?

0 个答案:

没有答案