Internal Server Error - Trying to enable Memory Caching

Hello

I am a total Nextcloud and Linux newbie so please be gentle with me. I had a Nextcloud instance running successfully with my own domain. Logged in as admin I was informed about the following:

The “Strict-Transport-Security” HTTP header is not configured to at least “15552000” seconds. For enhanced security, we recommend enabling HSTS as described in our security tips.

This I fixed following a guide, and my Nextcloud was working fine.

Then I thought I would try and enable memory caching to improve performance and this is where things fell apart.

I was following a guide that informed me to install:

apt-get install php-apcu php-apcu-bc

Then add the following to my config.php:

‘memcache.local’ => ‘\OC\Memcache\APCu’,

My config.php located in /var/www/html/nextcloud/config was blank. I then looked at a format for the config.php and created one and including the above line.

When I now go to my Nextcloud my.domain/nextcloud I get the following error:

"Internal Server Error

The server was unable to complete your request.
If this happens again, please send the technical details below to the server administrator.
More details can be found in the server log."

I restored the blank config.php file and still get the error.

Can someone please advise, in simple terms, how I can troubleshoot this problem please so I can get back up and running.

Thank you in advance!

Nextcloud version (eg, 18.0.2): 18.0.7
Operating system and version (eg, Ubuntu 20.04): Ubuntu 18.04 LTS Server
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.29
PHP version (eg, 7.1): PHP 7.2.24-0ubuntu0.18.04.6

Post your config.php

Thank you for your quick reply. It is blank.

Sorry let me be more clear. In my /var/www/html/nextcloud/config folder I have two files:

  1. config.php [which is blank, contains no data]
  2. config.sample.php

Thank you

Are there any log files I can look at that may give me a clue to what is happening?

With a blan config.php NOTHING works.
Perhaps install again and post errors while installation.

Thank you devnull. Is it possible for me to install just Nextcloud a fresh over the old install? If so, how would I do that?

Plus there was a config sample file which I renamed config.php but still doesn’t work (it had permission ROOT and not www-data which the enclosing folder had).

Thanks for your help in advance.

As a total newbie who is “learning by doing” I managed to get my instance of Nextcloud back up and running.

I note that my Nextcloud instance is just for me to play around with and learn by doing on a blank Ubuntu 18.04 server. Data loss was not a concern for me.

This is what I did (in case it helps someone else).

  1. Moved the nextcloud directory /var/www/html/ to nextcloud.OLD

  2. Change into the /tmp directory (with cd /tmp) and then issued the following command:

wget https://download.nextcloud.com/server/releases/nextcloud-19.0.0.zip

  1. unzip nextcloud-19.0.0.zip

  2. sudo mv nextcloud /var/www/html/

  3. sudo chown -R www-data:www-data /var/www/html/nextcloud

  4. I was then able to, via the web browser, get to the welcome page of nextcloud and created a new admin user and entered my previous database details

  5. From the admin user interface within nextcloud I deleted old users and the old admin account and now have a working instance of Nextcloud to play around with again.