Migrating Nextcloud 13 to new server

I am migrating my Nextcloud 13 install to a new server. I am able to browse to the new server but I get the

“Internal Server Error
The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.” error.

I have looked at the log file and it shows several of

“[Wed May 16 09:17:33.745384 2018] [:error] [pid 2575] [client 192.168.2.1:59041] PHP Warning: fileperms(): stat failed for /var/www/nextcloud-data//nextcloud.log in /var/www/nextcloud/lib/private/Log/File.php on line 136” errors. What did I miss.

  1. Did you move your logfile “/var/www/nextcloud/data/nextcloud.log” to “/var/www/nextcloud-data/nextcloud.log” or is this a typo?
  2. A good start is to see who is the owner and group of the log file ( ‘ls -alt /var/www/nextcloud/data’ respectively ‘ls -alt /var/www/nextcloud-data/nextcloud.log’
  3. owner and group should be your apache-user (e.g. for Ubuntu www-data and www-data)
  4. If its another user/group do ‘sudo chown -R www-data:www-data /var/www/nextcloud-data’ or ‘sudo chown -R www-data:www-data /var/www/nextcloud/’

Thanks for the suggestions I recopied my directories and those cleaned up the log file errors however I now have these errors. Any suggestions?

[Thu May 17 08:47:19.059578 2018] [mpm_prefork:notice] [pid 1624] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Thu May 17 08:47:19.060239 2018] [core:notice] [pid 1624] AH00094: Command line: '/usr/sbin/apache2'
[Thu May 17 08:56:43.469114 2018] [mpm_prefork:notice] [pid 1624] AH00169: caught SIGTERM, shutting down
[Thu May 17 08:57:06.079825 2018] [mpm_prefork:notice] [pid 1615] AH00163: Apache/2.4.18 (Ubuntu) OpenSSL/1.0.2g configured -- resuming normal operations
[Thu May 17 08:57:06.080222 2018] [core:notice] [pid 1615] AH00094: Command line: '/usr/sbin/apache2'

It could (please heed the “could”) be a wrong path to your php-lib. Google for “apache2 ah00169”