But rather than editing nextcloud.conf to change the DocumentRoot I moved the contents of /nextcloud into /var/www/html/ directly. that way when I bring down a new version, I unpack that into /nextcloud and move the relevant files and directories over to the root.
After activating the pretty URLs it is not longer possible to view videos
…is MySQL installed secure (no access from external) with apt install lamp-server?
The redirecting from HTTP to HTTPS is also not working for me - also if I follow the tutorial 100%
Out of interest, is your default 000-default.conf site still enabled?
ls /etc/apache2/sites-enabled to see if it’s there.
The optional redirect I have there relies on the 000-default site being disabled with sudo a2dissite 000-default.conf and an apache reload/restart. I don’t know why, but I didn’t include that in the guide (edited now). I can confirm that prior to disabling that, it wouldn’t redirect, but as soon as I did + apache restart, it worked fine.
An interesting one for me; I followed my own tutorial and everything was going fine up until pretty URLs, which enabled but failed to work (displaying directory listing instead) - on inspection, everything above “Do not edit above this line” in .htaccess was missing.
Thanks @tflidd. I can add point one but default-ssl.conf is always disabled on Ubuntu until manually enabled.
For point two thanks, will add that in. Up to this point my installations haven’t included the extras in the conf file or any SSL hardening and have been fine, but it’d be wrong not to promote best practices
$htaccessContent = file_get_contents($setupHelper->pathToHtaccess());
$content = "#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####\n";
$htaccessContent = explode($content, $htaccessContent, 2)[0];
So if the code was missing before, it will also miss afterwards. But other then that it updates correctly here.
I was checking again, now it work. I also found the error:
Instead of copying the old .htaccess file, I accidentally moved it (so there was no original one).
Thank you Your new guide works for the Force-SSL things. I have now pretty URLs etc. under my root-directory. Data is stored in /var/cloud-data The only problem is, that videos are not playable My log:
Error index Exception: {"Exception":"RedisException","Message":"Redis server went away","Code":0,"Trace":"#0 \/var\/www\/html\/nextcloud\/lib\/private\/Memcache\/Redis.php(114): Redis->incrBy('8a73d596d967558...', 1)\n#1 \/var\/www\/html\/nextcloud\/lib\/private\/Lock\/MemcacheLockingProvider.php(73): OC\\Memcache\\Redis->inc('files\/d5c46342e...')\n#2 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Common.php(651): OC\\Lock\\MemcacheLockingProvider->acquireLock('files\/d5c46342e...', 1)\n#3 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(584): OC\\Files\\Storage\\Common->acquireLock('files\/Documents...', 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#4 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php(584): OC\\Files\\Storage\\Wrapper\\Wrapper->acquireLock('files\/Documents...', 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#5 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php(1910): OC\\Files\\Storage\\Wrapper\\Wrapper->acquireLock('files\/Documents...', 1, Object(OC\\Lock\\MemcacheLockingProvider))\n#6 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php(2013): OC\\Files\\View->lockPath('\/Documents\/Abou...', 1, false)\n#7 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php(1106): OC\\Files\\View->lockFile('\/Documents\/Abou...', 1)\n#8 \/var\/www\/html\/nextcloud\/lib\/private\/Files\/View.php(963): OC\\Files\\View->basicOperation('fopen', '\/Documents\/Abou...', Array, 'r')\n#9 \/var\/www\/html\/nextcloud\/lib\/private\/Preview\/TXT.php(48): OC\\Files\\View->fopen('\/Documents\/Abou...', 'r')\n#10 \/var\/www\/html\/nextcloud\/lib\/private\/Preview.php(1142): OC\\Preview\\TXT->getThumbnail('\/Documents\/Abou...', 2048, 2048, false, Object(OC\\Files\\View))\n#11 \/var\/www\/html\/nextcloud\/lib\/private\/Preview.php(777): OC\\Preview->generatePreview(5)\n#12 \/var\/www\/html\/nextcloud\/lib\/private\/Preview.php(802): OC\\Preview->getPreview()\n#13 \/var\/www\/html\/nextcloud\/core\/ajax\/preview.php(64): OC\\Preview->showPreview()\n#14 \/var\/www\/html\/nextcloud\/lib\/private\/Route\/Route.php(155) : runtime-created function(1): require_once('\/var\/www\/html\/n...')\n#15 [internal function]: __lambda_func()\n#16 \/var\/www\/html\/nextcloud\/lib\/private\/Route\/Router.php(293): call_user_func('\\x00lambda_20', Array)\n#17 \/var\/www\/html\/nextcloud\/lib\/base.php(967): OC\\Route\\Router->match('\/core\/preview.p...')\n#18 \/var\/www\/html\/nextcloud\/index.php(48): OC::handleRequest()\n#19 {main}","File":"\/var\/www\/html\/nextcloud\/lib\/private\/Memcache\/Redis.php","Line":114} 2016-08-31T12:01:44+00:00 admin
Error PHP Cannot modify header information - headers already sent by (output started at /var/www/html/nextcloud/3rdparty/sabre/http/lib/Sapi.php:83) at /var/www/html/nextcloud/3rdparty/sabre/http/lib/Sapi.php#63 2016-08-31T11:56:16+00:00 admin
Error PHP Cannot modify header information - headers already sent by (output started at /var/www/html/nextcloud/3rdparty/sabre/http/lib/Sapi.php:83) at /var/www/html/nextcloud/3rdparty/sabre/http/lib/Sapi.php#58 2016-08-31T11:56:16+00:00 admin