Reaching nextcloud on domain instead domain/nextcloud [SOLVED]

To get access to my nextcloud I have to enter, I would like to drop the /nextcloud and just use
I’m running version 16.03 on debian buster

My config.php file:

$CONFIG = array (
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '',
    2 => '',
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => '',
  'htaccess.RewriteBase' => '/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'instanceid' => 'xxxxx',
  'mysql.utf8mb4' => true,
  'dbuser' => 'dbUser',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'help' => '',

My /etc/apache2/sites-available/nextcloud.conf

Alias /nextcloud "/var/www/nextcloud/"

<Directory /var/www/nextcloud/>
  Require all granted
  Options FollowSymlinks MultiViews
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off

 SetEnv HOME /var/www/nextcloud
 SetEnv HTTP_HOME /var/www/nextcloud



I believe you need to change these two lines.

In config.php

'htaccess.RewriteBase' => '/',

In apache config

I think this can be commented.
If your system is not a high-availability system, you can just try the changes. Otherwise a look into the admin guide will be necessary :wink:

Doesn’t work, I tried it again but lose access to the as well.

Here we go :slight_smile:

You would need to change your DocumentRoot to Nextcloud’s folder rather than the folder above it.

1 Like

That was it, thought I handled that, thank you!

Thank you for solution but maybe for lamers like me could you be more specific step by step what to do?