【发布时间】:2014-04-03 09:47:16
【问题描述】:
在 ubuntu 机器上测试我的 yii 应用程序时,/var/log/apache2/error.log 每次访问页面时都会显示以下错误。
客户端被服务器配置拒绝:/var/www/item,引用者:https://xxx.xx.xx.xxx/storemgr/issue/manage
在 Windows 中测试时没有错误记录。
但我在浏览器中访问页面时没有遇到任何问题。
我使用的网址:https://xxx.xx.xx.xxx/storemgr/item/manage
我的 Apache 配置:
<Directory /var/www/storemgr/>
AllowOverride All
Order allow,deny
Allow from all
</Directory>
main.php 中的网址管理器
'urlManager'=>array
(
'urlFormat'=>'path',
'showScriptName'=>false,
'rules'=>array
(
'<controller:\w+>/<id:\d+>'=>'<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
'<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
),
),
.htaccess webroot的内容(即storemgr)
<ifModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1
</ifModule>
请帮忙。
【问题讨论】: