当我放
Order deny,allow
Deny from all
Allow from dev.example.com
进入/etc/apache2/conf.d/restrict.conf
,当service apache2 restart
我得到
Syntax error on line 1 of /etc/apache2/conf.d/restrict.conf:
order not allowed here
Action 'configtest' failed.
The Apache error log may have more information.
...fail!
请帮忙。
答案1
你的问题不是 mod_authnz_host 没有安装或加载,而是你把这些指令放在了错误的位置。它们只在以下<Location ...>
或块中有效:<Directory ...>
<Location />
Order deny,allow
Deny from all
Allow from dev.example.com
</Location>