a2enmod info.load service apache2 restart
要在Firefox中input“myvps_ip / server-info”,会出现一个错误信息:
You don't have permission to access /server-info on this server. cat /etc/apache2/mods-available/info.conf <IfModule mod_info.c> <Location /server-info> SetHandler server-info Require local #Require ip 192.0.2.0/24 </Location> </IfModule>
如何设置configuration文件以访问vps_ip上的servero-info?
你标记了这个postapache2.2,这意味着你需要allow from而不是require 。
也require local不会有效的任一版本。 你可能想要
# Apache v2.4 Require ip <your CIDR> # Apache v2.2 Allow from <your CIDR>