Reaching nextcloud on domain instead domain/nextcloud [SOLVED]

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

My config.php file:

<?php
$CONFIG = array (
  'passwordsalt' => 'xxxx',
  'secret' => 'xxxx',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => '192.168.1.13',
    2 => 'domain.com',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '16.0.3.0',
  'overwrite.cli.url' => 'https://domain.com/nextcloud',
  '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
 </IfModule>

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

</Directory>

Thanks

I believe you need to change these two lines.

In config.php

To
'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 domain.com/nextcloud as well.

https://docs.nextcloud.com/server/16/admin_manual/installation/source_installation.html#pretty-urls

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?