Nextcloud 13 - 新安装500内部服务器错误

时间:2018-02-16 23:38:51

标签: php apache ubuntu nextcloud

我整个下午一直在努力设置NC 13,当我第一次尝试访问http://127.0.0.1/nextcloud时,我无法解决此错误:

    @author Joas Schilling * @author Jörn Friedrich Dreyer * @author Lukas Reschke * @author Morris Jobke * @author Robin Appelman * @author Sergio Bertolín * @author Thomas Müller * @author Vincent Petry * * @license AGPL-3.0 * * This code is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License, version 3, * along with this program. If not, see * */ requireonce __DIR_ . '/lib/versioncheck.php'; try { requireonce __DIR_ . '/lib/base.php'; OC::handleRequest(); } catch(\OC\ServiceUnavailableException $ex) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); OC_Template::printExceptionErrorPage($ex); } catch (\OC\HintException $ex) { OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); try { OC_Template::printErrorPage($ex->getMessage(), $ex->getHint()); } catch (Exception $ex2) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); \OC::$server->getLogger()->logException($ex2, array('app' => 'index')); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } } catch (\OC\User\LoginException $ex) { OC_Response::setStatus(OC_Response::STATUS_FORBIDDEN); OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage()); } catch (Exception $ex) { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); //show the user a detailed error page OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); } catch (Error $ex) { try { \OC::$server->getLogger()->logException($ex, array('app' => 'index')); } catch (Error $e) { $claimedProtocol = strtoupper($_SERVER['SERVER_PROTOCOL']); $validProtocols = [ 'HTTP/1.0', 'HTTP/1.1', 'HTTP/2', ]; $protocol = 'HTTP/1.1'; if(in_array($claimedProtocol, $validProtocols, true)) { $protocol = $claimedProtocol; } header($protocol . ' 500 Internal Server Error'); header('Content-Type: text/plain; charset=utf-8'); print("Internal Server Error\n\n"); print("The server encountered an internal error and was unable to complete your request.\n"); print("Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.\n"); print("More details can be found in the webserver log.\n"); throw $e; } OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); OC_Template::printExceptionErrorPage($ex); }

这是我的config.php:

<?php

$CONFIG = array (

'passwordsalt' => 'XXXXXXXXXXXXXX',

'secret' => 'XXXXXXXXXXXXXXXXXXXXX',

'trusted_domains' =>

array (

0 => 'localhost',

1 => '127.0.0.1',

),

'datadirectory' => '/var/www/html/nextcloud/data',

'overwrite.cli.url' => 'http://127.0.0.1/',

'dbtype' => 'mysql',

'version' => '13.0.0.14',

'dbname' => 'nextclouddb',

'dbhost' => '127.0.0.1',

'dbport' => '',

'dbtableprefix' => 'oc_',

'dbuser' => 'nextcloud',

'dbpassword' => 'password',

'installed' => true,

'instanceid' => 'XXXXXXXXX',

);

我编辑了几行来隐藏敏感信息。

我使用的是mysql,php 7.1和ubuntu 16.04。有什么想法吗?

由于

0 个答案:

没有答案