Insternal server error after i once changed the ip in config file

[/details]

Nextcloud version (21.0.1)
Operating system and version (Centos 8)
Apache or nginx version (httpd-2.4.37-30.):
PHP version (php-7.4.19-1.):

The issue you are facing: everything was working fine but after i changed my ip address it starting showing this error than i changed it in the config file but it does’nt work after that i restored the ip and everything as earlier but it still isn’nt working

Is this the first time you’ve seen this error? (Y/N):Y

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:


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.
Technical details

    Remote Address: 192.168.25.140
    Request ID: YKNqP4zMtlSmKjulgClhegAAAMM


The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

i<?php
$CONFIG = array (
  'instanceid' => 'ocrdatkotesx',
  'passwordsalt' => '0biAcIfoBcWtShSAS7lDAaTW8SEE3R',
  'secret' => 'zewqfyfdNgtzy3wd1vF8cz8rBRth0p7+ZFA58zdZLp0PDpCs',
  'trusted_domains' =>
  array (
    1 => '192.168.25.140',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'dbtype' => 'sqlite3',
  'version' => '21.0.1.1',
  'overwrite.cli.url' => 'http://192.168.25.140',
  'installed' => true,
);


tail -f /var/log/apache2/error.log

Good morning mate, hope you are doing well…

First of all, you may need to delete your instanceid from the cache, do it running this:
sudo -u apache php /var/www/html/nextcloud/occ config:system:delete instanceid

Then, try rebooting your server and test it. If this do not solve your problem, run this:
1) sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
2) chown -R www-data:www-data /var/www/nextcloud/
3) chmod -R 770 /var/www/nextcloud/
4) sudo -u www-data php /var/www/nextcloud/occ maintenance:repair
5) sudo -u www-data php /var/www/nextcloud/occ db:add-missing-columns
6) sudo -u www-data php /var/www/nextcloud/occ db:add-missing-indices
7) sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess
8) sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --off
9) sudo systemctl restart apache2

Also, check your php version running “php -v”, that can help a lot.

Make sure you have php-fpm installed and running.

Hope this helps, have a nice weekend.

All the best!

:smiley:

One more thing, the letter “i” that you post here, was it in the actual file or you just typed it unintentionally?

Make sure your file only starts with:

<?php