当我尝试从 localhost 运行应用程序时,error.log
文件中记录了以下消息
[Sat Aug 03 23:05:05 2013] [error] [client 127.0.0.1] client denied by server configuration: /var/www/xyz/system/
[Sat Aug 03 23:05:05 2013] [error] [client 127.0.0.1] client denied by server configuration: /var/www/xyz/application/
该.htaccess
文件包含
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ xyz/index.php?/$1 [L]
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ xyz/index.php?/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ xyz/index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /index.php
</IfModule>
有人可以解释这里发生了什么并导致这种情况吗?
更新:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride All
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
PS 该应用程序是使用 CodeIgniter 框架
更新 2 构建的:权限设置
drwxr-xr-x 15 abc abc 4096 Jul 31 22:06 application
-rwxr-xr-x 1 abc abc 2496 Jul 31 22:02 license.txt
drwxr-xr-x 8 abc abc 4096 Jul 31 22:09 system