Internal server error after migration after changing the provider

I’ve just migrated a WordPress website and a Nextcloud 29.0.4.1 installation from one provider to another. Both are Apache servers running on PHP 8.3. I used the same methods:

  1. downloaded the database through phpmyadmin and imported it one the new server.
  2. copied the files through FTPS from the source to the new server.

WordPress works just fine, Nextcloud not at all. It gives the famous “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.

The server log is empty, the Nexcloud logfile does not contain any entries of today.

I have access to the SSH shell, but couldn’t run any occ comands, for example:

occ integrity:check-core

I am not super familiar with Nextcloud, so please have patience with me. Of course, I tried Googlel and ChatGPT, cut couldn’t find an answer.

The config.php was updated, of course.

Any help would be very appreciated.

Unfortunately, you don’t have much information. Let /path/to/nextcloud be the path to your Nextcloud. There you will find occ which is called via the web server user, e.g. www-data via php.

sudo -u www-data php /path/to/nextcloud/occ ...

You can also test this command. The command is a little bit stupid. But maybe you get an error for your problem.

sudo -u www-data php /path/to/nextcloud/index.php

Maybe you find not the error because this uses php-cli and not web php.

Maybe also check the file /path/to/nextcloud/.htaccess and other dot-files.

1 Like

My bad. There was a typo in the database name. I did not expect an “internal server error” in this case but rather a database connection error. Anyway, THIS error disappeard. However, I still can’t run any occ comands.

To avoid misunderstandings: This is shared hosting with no root access.

Now I get a blank login page. If I try to load some of the files in the source code, I get an .htaccess error. For example:

https://cloud-kgv-weiherfeld.de/core/css/guest.css?v=76b017a0-0

You don’t have permission to access this resource. Server unable to read htaccess file, denying access to be safe

There is no .htaccess in the core or css folder. What’s going on here?

The problem were the file permissions. Alle files were set to 640, and all folders to 750. Don’t know why this happened here. I’ve have never had such problem after migrating files between servers. Anyway, it works now.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.