指定Include conf文件时,Apache Conf失败

我有一个很好的Drupal多站点安装。 自从我设置了这个一直在窃听我,我试图找出为什么这不起作用。

当我重新加载apache时,我得到以下错误,当我有“包括conf.d / ip.conf”行未注释:

allow not allowed here ...fail! 

如果我指定IP地址如下(他们现在评论)它的作品!

任何意见或帮助将非常感激(显然这些IP地址不是我正在使用的)。

 <Directory "/home/d/r/drupal/web/public_html"> AllowOverride none # Define file limitations on drupal files <FilesMatch "(install.php|cron.php|update.php|\.txt)$"> Order deny,allow #================================================================= # THIS DOES NOT WORK? I GET AN ERROR RESTARTING APACHE FOR IP.CONF Include conf.d/ip.conf #================================================================= # SO I MANUALLY ADD THE IP ADDRESSES HERE: #Allow from 123.123.123.123 #Allow from 222.222.222.222 #Allow from 555.555.555.555 Deny from all </FilesMatch> <FilesMatch "robots.txt"> Allow from all </FilesMatch> # Read in Drupal default .htaccess file asif conf - easier CVS management Include /home/d/r/drupal/web/public_html/.htaccess # Offline mode for multisite setup - see file for more info # Uncomment the line below to set sites offline # Include conf.d/offline.conf </Directory> # Sorry, no svn peeking <DirectoryMatch "\.svn"> # Currently pointing back to drupal # High traffic sites might want custom # error pages, no need to load drupal ErrorDocument 403 /index.php Order allow,deny Deny from all Satisfy All </DirectoryMatch> # Allow the .htacces files to be used in the sites folder where /files are stored <Directory "/home/d/r/drupal/web/public_html/sites"> AllowOverride </Directory> 

ip.conf看起来像这样:

 Allow from 123.123.123.123 Allow from 222.222.222.222 Allow from 555.555.555.555 

这个问题是由于apache2.conf加载了conf.d中的所有文件(包括conf.d / *),这意味着ip.conf被加载到了错误的地方。 这意味着allow from语境中处理的语句。