在mod_rewirte之后:内部服务器错误服务器遇到内部错误

时间:2014-10-01 10:19:47

标签: cakephp apache2 ubuntu-14.04

我遇到以下问题。我在Cakephp中遇到了这个错误  "在您的服务器上未正确配置URL重写"。解决方案是添加此行

  

      选项FollowSymLinks       AllowOverride All       

到000-default.conf文件/etc/apache2/sites-available/000-default.conf

cakephp包含css但是当我尝试访问我的localhost时我收到错误: 内部服务器错误 服务器遇到内部错误或配置错误,无法完成您的请求。 为了使其工作,我必须删除000-default.conf文件中的更改。

如何修复它以使两者都有效?

我的000-default.conf的代码



<VirtualHost *:80>
	# The ServerName directive sets the request scheme, hostname and port that
	# the server uses to identify itself. This is used when creating
	# redirection URLs. In the context of virtual hosts, the ServerName
	# specifies what hostname must appear in the request's Host: header to
	# match this virtual host. For the default virtual host (this file) this
	# value is not decisive as it is used as a last resort host regardless.
	# However, you must set it for any further virtual host explicitly.
	#ServerName www.example.com

	ServerAdmin webmaster@localhost
	DocumentRoot /var/www/html
    
    <Directory />
    Options FollowSymLinks
    AllowOverride All
    </Directory>

    <Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order Allow,Deny
    Allow from all
    </Directory>

	# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
	# error, crit, alert, emerg.
	# It is also possible to configure the loglevel for particular
	# modules, e.g.
	#LogLevel info ssl:warn

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined

	# For most configuration files from conf-available/, which are
	# enabled or disabled at a global level, it is possible to
	# include a line for only one particular virtual host. For example the
	# following line enables the CGI configuration for this host only
	# after it has been globally disabled with "a2disconf".
	#Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
&#13;
&#13;
&#13;

应用程序/ TMP /日志/ error.log中:

2014-10-03 04:58:58 Error: [MissingActionException] Action UsersController::index() could not be found.

异常属性:数组(   &#39;控制器&#39; =&GT; &#39; UsersController&#39 ;,   &#39;动作&#39; =&GT; &#39;指数&#39 ;, ) 请求网址:/ cakephp / acl_1 / Users 堆栈跟踪:

0 /var/www/html/cakephp/acl_1/lib/Cake/Routing/Dispatcher.php(191):Controller-&gt; invokeAction(Object(CakeRequest))

1 /var/www/html/cakephp/acl_1/lib/Cake/Routing/Dispatcher.php(165):Dispatcher-&gt; _invoke(Object(UsersController),Object(CakeRequest))

2 /var/www/html/cakephp/acl_1/app/webroot/index.php(108):Dispatcher-&gt; dispatch(Object(CakeRequest),Object(CakeResponse))

3 {main}

2014-10-03 07:16:50错误:致命错误(1):[/var/www/html/cakephp/acl_1/lib/Cake/View/Helper/FormHelper.php中不支持的操作数类型,行1802] 2014-10-03 07:16:50错误:[FatalErrorException]不支持的操作数类型 请求网址:/ cakephp / acl_1 / users / view / 1 堆栈跟踪:

0 /var/www/html/cakephp/acl_1/lib/Cake/Error/ErrorHandler.php(203):ErrorHandler :: handleFatalError(1,&#39; Unsupported ope ...&#39;,& #39; / var / www / html / c ...&#39;,1802)

1 [内部函数]:ErrorHandler :: handleError(1,&#39; Unsupported ope ...&#39;,&#39; / var / www / html / c ...&#39;, 1802,数组)

2 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(929):call_user_func(&#39; ErrorHandler :: h ...&#39;,1,&# 39;不支持的操作...&#39;,&#39; / var / www / html / c ...&#39;,1802,数组)

3 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(902):App :: _ checkFatalError()

4 [内部函数]:App :: shutdown()

5 {main}

2014-10-03 07:19:19错误:致命错误(1):[/var/www/html/cakephp/acl_1/lib/Cake/View/Helper/FormHelper.php中不支持的操作数类型,行1802] 2014-10-03 07:19:19错误:[FatalErrorException]不支持的操作数类型 请求网址:/ cakephp / acl_1 / users / edit / 1 堆栈跟踪:

0 /var/www/html/cakephp/acl_1/lib/Cake/Error/ErrorHandler.php(203):ErrorHandler :: handleFatalError(1,&#39; Unsupported ope ...&#39;,& #39; / var / www / html / c ...&#39;,1802)

1 [内部函数]:ErrorHandler :: handleError(1,&#39; Unsupported ope ...&#39;,&#39; / var / www / html / c ...&#39;, 1802,数组)

2 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(929):call_user_func(&#39; ErrorHandler :: h ...&#39;,1,&# 39;不支持的操作...&#39;,&#39; / var / www / html / c ...&#39;,1802,数组)

3 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(902):App :: _ checkFatalError()

4 [内部函数]:App :: shutdown()

5 {main}

2014-10-03 07:22:04错误:致命错误(1):[/var/www/html/cakephp/acl_1/lib/Cake/View/Helper/FormHelper.php,行中不支持的操作数类型1802] 2014-10-03 07:22:04错误:[FatalErrorException]不支持的操作数类型 请求网址:/ cakephp / acl_1 / users / edit / 2 堆栈跟踪:

0 /var/www/html/cakephp/acl_1/lib/Cake/Error/ErrorHandler.php(203):ErrorHandler :: handleFatalError(1,&#39; Unsupported ope ...&#39;,& #39; / var / www / html / c ...&#39;,1802)

1 [内部函数]:ErrorHandler :: handleError(1,&#39; Unsupported ope ...&#39;,&#39; / var / www / html / c ...&#39;, 1802,数组)

2 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(929):call_user_func(&#39; ErrorHandler :: h ...&#39;,1,&# 39;不支持的操作...&#39;,&#39; / var / www / html / c ...&#39;,1802,数组)

3 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(902):App :: _ checkFatalError()

4 [内部函数]:App :: shutdown()

5 {main}

2014-10-03 07:28:35错误:致命错误(1):[/var/www/html/cakephp/acl_1/lib/Cake/View/Helper/FormHelper.php中不支持的操作数类型,行1802] 2014-10-03 07:28:35错误:[FatalErrorException]不支持的操作数类型 请求网址:/ cakephp / acl_1 / users / edit / 3 堆栈跟踪:

0 /var/www/html/cakephp/acl_1/lib/Cake/Error/ErrorHandler.php(203):ErrorHandler :: handleFatalError(1,&#39; Unsupported ope ...&#39;,& #39; / var / www / html / c ...&#39;,1802)

1 [内部函数]:ErrorHandler :: handleError(1,&#39; Unsupported ope ...&#39;,&#39; / var / www / html / c ...&#39;, 1802,数组)

2 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(929):call_user_func(&#39; ErrorHandler :: h ...&#39;,1,&# 39;不支持的操作...&#39;,&#39; / var / www / html / c ...&#39;,1802,数组)

3 /var/www/html/cakephp/acl_1/lib/Cake/Core/App.php(902):App :: _ checkFatalError()

4 [内部函数]:App :: shutdown()

5 {main}

0 个答案:

没有答案