我有一个drupal多站点安装,工作很好。自从我设置它,这一直困扰着我,我正在努力找出为什么这不工作。
当我重新加载apache时,当我没有注释的"Include con.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发布于 2011-12-25 18:12:46
造成此问题的原因是apache2.conf正在加载con.d(包括con.d/*)中的所有文件,这意味着ip.conf加载到了错误的位置。这意味着在上下文之外处理的allow from语句。
https://serverfault.com/questions/106258
复制相似问题