您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

在服务器上部署 Laravel 工程

2025/11/5 21:14:57发布12次查看
用 laravel 框架写了一个工程,已经在本机测试好了,准备部署到一台外网服务器(阿里云的)。
目前这台服务器操作系统是 ubuntu 12.04,装了 php 5.6.18,根据 jellybool 的帖子 进行了 nginx 配置,访问后是 laravel 的出错页面,如下:
看了一下 larval.log 中的 log,内容如下:
[2016-02-25 10:24:42] production.error: exception 'reflectionexception' with message 'class app\http\controllers\officialwebsitecontroller does not exist' in /var/www/shark/vendor/illuminate/routing/route.php:264 stack trace: #0 /var/www/shark/vendor/illuminate/routing/route.php(264): reflectionmethod->__construct('app\\http\\contro...', 'index') #1 /var/www/shark/vendor/illuminate/routing/router.php(838): illuminate\routing\route->signatureparameters('illuminate\\data...') #2 /var/www/shark/vendor/illuminate/routing/router.php(823): illuminate\routing\router->substituteimplicitbindings(object(illuminate\routing\route)) #3 /var/www/shark/vendor/illuminate/routing/router.php(806): illuminate\routing\router->substitutebindings(object(illuminate\routing\route)) #4 /var/www/shark/vendor/illuminate/routing/router.php(670): illuminate\routing\router->findroute(object(illuminate\http\request)) #5 /var/www/shark/vendor/illuminate/routing/router.php(654): illuminate\routing\router->dispatchtoroute(object(illuminate\http\request)) #6 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(246): illuminate\routing\router->dispatch(object(illuminate\http\request)) #7 [internal function]: illuminate\foundation\http\kernel->illuminate\foundation\http\{closure}(object(illuminate\http\request)) #8 /var/www/shark/vendor/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request)) #9 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/middleware/checkformaintenancemode.php(44): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request)) #10 [internal function]: illuminate\foundation\http\middleware\checkformaintenancemode->handle(object(illuminate\http\request), object(closure)) #11 /var/www/shark/vendor/illuminate/pipeline/pipeline.php(124): call_user_func_array(array, array) #12 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request)) #13 /var/www/shark/vendor/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request)) #14 [internal function]: illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request)) #15 /var/www/shark/vendor/illuminate/pipeline/pipeline.php(103): call_user_func(object(closure), object(illuminate\http\request)) #16 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(132): illuminate\pipeline\pipeline->then(object(closure)) #17 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(99): illuminate\foundation\http\kernel->sendrequestthroughrouter(object(illuminate\http\request)) #18 /var/www/shark/public/index.php(54): illuminate\foundation\http\kernel->handle(object(illuminate\http\request)) #19 {main}

执行过 composer dump-autoload,提示一行绿字 generating autoload files,没有成功失败提示。
另外,php 没有启用 openssl,尝试启用但是遇到一些麻烦,不知道目前是否有必要,暂时没有启用。
回复内容: 用 laravel 框架写了一个工程,已经在本机测试好了,准备部署到一台外网服务器(阿里云的)。
目前这台服务器操作系统是 ubuntu 12.04,装了 php 5.6.18,根据 jellybool 的帖子 进行了 nginx 配置,访问后是 laravel 的出错页面,如下:
看了一下 larval.log 中的 log,内容如下:
[2016-02-25 10:24:42] production.error: exception 'reflectionexception' with message 'class app\http\controllers\officialwebsitecontroller does not exist' in /var/www/shark/vendor/illuminate/routing/route.php:264 stack trace: #0 /var/www/shark/vendor/illuminate/routing/route.php(264): reflectionmethod->__construct('app\\http\\contro...', 'index') #1 /var/www/shark/vendor/illuminate/routing/router.php(838): illuminate\routing\route->signatureparameters('illuminate\\data...') #2 /var/www/shark/vendor/illuminate/routing/router.php(823): illuminate\routing\router->substituteimplicitbindings(object(illuminate\routing\route)) #3 /var/www/shark/vendor/illuminate/routing/router.php(806): illuminate\routing\router->substitutebindings(object(illuminate\routing\route)) #4 /var/www/shark/vendor/illuminate/routing/router.php(670): illuminate\routing\router->findroute(object(illuminate\http\request)) #5 /var/www/shark/vendor/illuminate/routing/router.php(654): illuminate\routing\router->dispatchtoroute(object(illuminate\http\request)) #6 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(246): illuminate\routing\router->dispatch(object(illuminate\http\request)) #7 [internal function]: illuminate\foundation\http\kernel->illuminate\foundation\http\{closure}(object(illuminate\http\request)) #8 /var/www/shark/vendor/illuminate/routing/pipeline.php(52): call_user_func(object(closure), object(illuminate\http\request)) #9 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/middleware/checkformaintenancemode.php(44): illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request)) #10 [internal function]: illuminate\foundation\http\middleware\checkformaintenancemode->handle(object(illuminate\http\request), object(closure)) #11 /var/www/shark/vendor/illuminate/pipeline/pipeline.php(124): call_user_func_array(array, array) #12 [internal function]: illuminate\pipeline\pipeline->illuminate\pipeline\{closure}(object(illuminate\http\request)) #13 /var/www/shark/vendor/illuminate/routing/pipeline.php(32): call_user_func(object(closure), object(illuminate\http\request)) #14 [internal function]: illuminate\routing\pipeline->illuminate\routing\{closure}(object(illuminate\http\request)) #15 /var/www/shark/vendor/illuminate/pipeline/pipeline.php(103): call_user_func(object(closure), object(illuminate\http\request)) #16 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(132): illuminate\pipeline\pipeline->then(object(closure)) #17 /var/www/shark/vendor/laravel/framework/src/illuminate/foundation/http/kernel.php(99): illuminate\foundation\http\kernel->sendrequestthroughrouter(object(illuminate\http\request)) #18 /var/www/shark/public/index.php(54): illuminate\foundation\http\kernel->handle(object(illuminate\http\request)) #19 {main}

执行过 composer dump-autoload,提示一行绿字 generating autoload files,没有成功失败提示。
另外,php 没有启用 openssl,尝试启用但是遇到一些麻烦,不知道目前是否有必要,暂时没有启用。
officialwebsitecontroller does not exist
反射这个控制器,没有找到,看看是不是命名大小写的问题
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product