[英]Client Denied By Server Apache
When I try to run an application from localhost, the following message is recorded in error.log
file 当我尝试从本地主机运行应用程序时,以下消息记录在
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/
The .htaccess
file contains .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>
Can someone explain what's happening here and causing this? 有人可以解释这里发生的情况并引起此情况吗?
Update: 更新:
<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 The application is built using CodeIgniter Framework PS该应用程序是使用CodeIgniter框架构建的
Update 2: Permission settings 更新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
I was finally able to solve it. 我终于能够解决它。 The problem was caused due to missing of
index.php
. 该问题是由于缺少
index.php
引起的。 The file should be present in the folder where application folder and system folder resides. 该文件应存在于应用程序文件夹和系统文件夹所在的文件夹中。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.