Hello,
Yesterday I follow this tutorial about the installation of nextcloud on my new raspberry pi 3 under raspbian.
http://unixetc.co.uk/2016/11/20/simple-nextcloud-installation-on-raspberry-pi/
Everything worked fine, so i tried the next level by using a https connection with the following tutorial :
Activate SSL
We need to activate the Apache SSL Module.
a2enmod ssl
service apache2 reload
Clean up
I decided to remove the default config I created in the last tutorial.
This will remove the shortcut in the directory /etc/apache2/sites-enable
a2dissite default.conf
switch to the config directory
cd /etc/apache2/sites-available
and remove the config files itself
rm default.conf
Config
Let’s start clean.
We need to redirect all request on Port 80 to 443/HTTPS
nano nextcloud-redirect.conf
<VirtualHost *:80>
ServerName mycloud.domain.com
ServerAdmin webmaster@example.com
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
and we need a host config which will handle all the HTTPS Traffic
nano nextcloud.conf
ServerAdmin ebmaster@example.com
ServerName mycloud.domain.com
DocumentRoot /var/www/nextcloud
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15768000; preload"
</IfModule>
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
As always we need to activate the files
a2ensite nextcloud-redirect.conf
a2ensite nextcloud.conf
The symlinks are now created automatically.
restart apache
service apache2 restart
but I destroy everything and i couldnt access my cloud neither with the https or the http now.
So i tried to delete everything I had done : apt-get autoremove --purge apache2 php5 ect… , and rm -r nextcloud.
I try to reinstall with the simpel http connexion from the first tuto but when i try to acces the http://192.168.1.1/nextcloud i have this white page :
- @author Lukas Reschke
- @author Morris Jobke
- @author Robin Appelman
- @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
*/
// Show warning if a PHP version below 5.4.0 is used, this has to happen here
// because base.php will already use 5.4 syntax.
if (version_compare(PHP_VERSION, ‘5.4.0’) === -1) {
echo ‘This version of Nextcloud requires at least PHP 5.4.0
’;
echo 'You are currently running ’ . PHP_VERSION . ‘. Please update your PHP version.’;
return;
}
// Show warning if PHP 7.1 is used as Nextcloud is not compatible with PHP 7.1 for now
// @see https://github.com/nextcloud/docker-ci/issues/10
if (version_compare(PHP_VERSION, ‘7.1.0’) !== -1) {
echo ‘This version of Nextcloud is not compatible with PHP 7.1.
’;
echo 'You are currently running ’ . PHP_VERSION . ‘.’;
return;
}
try {
require_once 'lib/base.php';
OC::handleRequest();
} catch(\OC\ServiceUnavailableException $ex) {
\OC::$server->getLogger()->logException($ex, [‘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);
OC_Template::printErrorPage($ex->getMessage(), $ex->getHint());
} catch (Exception $ex) {
\OC::$server->getLogger()->logException($ex, [‘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) {
\OC::$server->getLogger()->logException($ex, [‘app’ => ‘index’]);
OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR);
OC_Template::printExceptionErrorPage($ex);
}
.
I try to check in this forum i somebody had the trouble as me but nothing help me so I post this.
Thanks you for your time and help, its my first project and im sad to destroy everything i should made a backup of my rasp