Could not rename base directory

I set up nextcloud 12 on my server.
And I want to access the system by subdirectory.
So I rename ‘nextcloud/’ to ‘somedir/’.

However, I try to login next cloud on http://example.com/path/to/somedir , I can’t login but redirect to login page.

What should I do?

this is my config/config.php

<?php
$CONFIG = array (
  'instanceid' => 'instanceid',
  'passwordsalt' => 'salt',
  'secret' => 'secret',
  'trusted_domains' =>
  array (
    0 => 'example.com',
  ),
  'datadirectory' => '/var/www/path/to/somedir/data',
  'overwrite.cli.url' => 'http://example.com/path/to/some/dir',
  'dbtype' => 'pgsql',
  'version' => '12.0.3.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpass',
  'installed' => true,
);

There’s nothing really we can help you with here. Feel free to edit your post with more information.

Sorry :bowing_man:.
I posted in the middle of editing…:cry:

Cool, so you’ll need to update your config.php file to reflect any change you’ve made to the URL too.

I edited datadirectory and overwrite.cli.url in config.php.
Should I need to edit other params?

You wouldn’t edit datadirectory for a URL… that’s likely broken it further.

I tried to install again.
The Installation might be success, but I cannot use nextcloud.

It shows ‘This content failed to load.’ in modal window on index.php/apps/files/

process…

  1. unzip nextcloud-12.0.3.zip
  2. mv nextcloud somedir
  3. access to http://example.com/path/to/somedir
  4. input authentication data
  5. click ‘complete setup’

If you’re going to start again, here’s a guide to follow.

Otherwise you’ll need to output logs - Nextcloud, Apache…

2 Likes

Recheck your webserver configuration as it should contain some location directive to /path/to/nextcloud/ which should be not valid anymore.

In cases the .htaccess/.user.ini files might contain some path information, too. You can try to update them by sudo -u www-data php /path/to/nextcloud/occ maintenance:update:htaccess.

I checked some settings and reinstalled according to the guide.
I could access correctly :heart_eyes:
Thanks a lot! :kissing_heart: