when creating a new domain / subdomain, an index.php is usually created automatically, which contains e.g. âhere will be soonâŚâ or something similar.
Before (!) Nextcloud is installed, this file must be removed. When Nextcloud is installed, a new index.php is created automatically.
This contains the following for me (NC 14.04):
<?php
/**
*
* Your webserver seems to be not configured to use PHP or PHP is not installed.
* Please contact your administrator or follow our documentation:
* https://docs.nextcloud.com/server/13/admin_manual/installation/source_installation.html
*
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Georg Ehrke <oc.list@georgehrke.com>
* @author Joas Schilling <coding@schilljs.com>
* @author JĂśrn Friedrich Dreyer <jfd@butonic.de>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <robin@icewind.nl>
* @author Sergio BertolĂn <sbertolin@solidgear.es>
* @author Thomas MĂźller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @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 <http://www.gnu.org/licenses/>
*
*/
require_once __DIR__ . '/lib/versioncheck.php';
try {
require_once __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_Template::printExceptionErrorPage($ex, 503);
} catch (\OC\HintException $ex) {
try {
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint(), 503);
} catch (Exception $ex2) {
try {
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
\OC::$server->getLogger()->logException($ex2, array('app' => 'index'));
} catch (Throwable $e) {
// no way to log it properly - but to avoid a white page of death we try harder and ignore this one here
}
//show the user a detailed error page
OC_Template::printExceptionErrorPage($ex, 500);
}
} catch (\OC\User\LoginException $ex) {
OC_Template::printErrorPage($ex->getMessage(), $ex->getMessage(), 403);
} catch (Exception $ex) {
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
//show the user a detailed error page
OC_Template::printExceptionErrorPage($ex, 500);
} catch (Error $ex) {
try {
\OC::$server->getLogger()->logException($ex, array('app' => 'index'));
} catch (Error $e) {
http_response_code(500);
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_Template::printExceptionErrorPage($ex, 500);
}
If that wasnât your question, please describe your problem in more detail.
Wenn das nicht deine Frage war, schildere dein Problem bitte etwas genauer.
Oh, apparently a directory named âindex.phpâ was created (for whatever reason) and the Nextcloud installation was done in it.
You can either redirect your domain to this directory (I donât know how to do this with 1&1) or delete your installation and run it again in the root directory of your domain.
Ask the support of 1&1 about the domain redirection.
UPDATE:
P.S. I just looked again: this is completely normal!
I donât know now how you could change that.
Jep that is what should work on Apache webserver, but other webserver do not read .htaccess files.
Note that with preload option your domain might get added to the list, so you will not be able to access it without https anymore. This is generally fine, but I think everyone should know, since I see this in so many guides without further explanation.
yes
I added this lines to have https without this it was http
so the server is reading the htaccess - which is good
but there is still index.php in the url!
just write this line : âhtaccess.IgnoreFrontControllerâ => false,
in your config.php (in config folder below your nextcloud installation) before the closing bracket (last line)
it will hides the index.php at generating. If the server isnât set up properly you will get an error, but since there are rewrite rules allready there, just give it a shot.
This seems to be a popular solution, but it doesnât work for me. When I add this line, the paths to all my assets (images, stylesheets) stop working, and removing index.php from the URL just gives me an open directory. So for instance, /apps/dashboard/ just shows me the subdirectories of that folder.
Am I missing some index.php files? I have upgraded to the latest instance of Nextcloud, incrementally, from a very old versionâso maybe thereâs something missing in my install, I donât know.