How to redirect nextcloud to root domain

Hi,
How to redirect nextcloud from https://cloud.example.com/nextcloud to https://cloud.example.com
Is it .htaccess issue or nextcloud config.php?
Regards?

Server configuration detail

Operating system: Linux 5.15.0-39-generic #42-Ubuntu SMP Thu Jun 9 23:42:32 UTC 2022 x86_64

Webserver: Apache/2.4.52 (Ubuntu) (apache2handler)

Database: mysql 10.6.7

PHP version: 8.1.2

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, apache2handler, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, ldap, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache

Nextcloud version: 24.0.2 - 24.0.2.1

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array ( )

List of activated apps
Enabled:
 - accessibility: 1.10.0
 - activity: 2.16.0
 - admin_audit: 1.14.0
 - announcementcenter: 6.3.1
 - apporder: 0.15.0
 - cloud_federation_api: 1.7.0
 - comments: 1.14.0
 - contactsinteraction: 1.5.0
 - dashboard: 7.4.0
 - dav: 1.22.0
 - federatedfilesharing: 1.14.0
 - files: 1.19.0
 - files_accesscontrol: 1.14.0
 - files_antivirus: 3.3.0
 - files_automatedtagging: 1.14.0
 - files_pdfviewer: 2.5.0
 - files_retention: 1.13.1
 - files_rightclick: 1.3.0
 - files_sharing: 1.16.2
 - files_trashbin: 1.14.0
 - files_versions: 1.17.0
 - files_videoplayer: 1.13.0
 - group_default_quota: 0.1.4
 - groupfolders: 12.0.0
 - groupquota: 0.1.8
 - impersonate: 1.11.0
 - logreader: 2.9.0
 - lookup_server_connector: 1.12.0
 - nextcloud_announcements: 1.13.0
 - notifications: 2.12.0
 - oauth2: 1.12.0
 - password_policy: 1.14.0
 - photos: 1.6.0
 - privacy: 1.8.0
 - provisioning_api: 1.14.0
 - quota_warning: 1.14.0
 - recommendations: 1.3.0
 - serverinfo: 1.14.0
 - settings: 1.6.0
 - sharebymail: 1.14.0
 - support: 1.7.0
 - survey_client: 1.12.0
 - systemtags: 1.14.0
 - text: 3.5.1
 - theming: 1.15.0
 - theming_customcss: 1.11.0
 - twofactor_backupcodes: 1.13.0
 - updatenotification: 1.14.0
 - user_ldap: 1.14.1
 - user_retention: 1.7.0
 - viewer: 1.8.0
 - workflowengine: 2.6.0
Disabled:
 - circles: 24.0.0
 - encryption
 - federation: 1.14.0
 - files_external
 - firstrunwizard: 2.13.0
 - geoblocker: 0.5.5
 - side_menu: 2.4.0
 - user_status: 1.4.0
 - weather_status: 1.4.0

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "bulut.XXX.com.tr",
        "127.0.0.1"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "24.0.2.1",
    "overwrite.cli.url": "http:\/\/bulut.XXX.com.tr\/nextcloud",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "proxy": "proxy.XXX.net:8080",
    "installed": true,
    "default_phone_region": "TR",
    "default_language": "tr",
    "default_locale": "tr_TR",
    "force_locale": "tr_TR",
    "maintenance": false,
    "updater.release.channel": "stable",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": "true",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0
    },
    "htaccess.RewriteBase": "\/nextcloud",
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "ldapIgnoreNamingRules": false,
    "ldapUserCleanupInterval": 51,
    "remember_login_cookie_lifetime": 86400,
    "session_lifetime": 7200,
    "auth.webauthn.enabled": false,
    "trashbin_retention_obligation": "auto,7",
    "enable_avatars": false,
    "enable_previews": false,
    "profile.enabled": false,
    "allow_user_to_change_display_name": false,
    "allow_user_to_change_mail_address": false,
    "theme": "",
    "lost_password_link": "disabled",
    "defaultapp": "files",
    "knowledgebaseenabled": false,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "25",
    "log_type": "file",
    "logfile": "\/data\/nextcloud.log",
    "loglevel": 2,
    "logdateformat": "d.m.Y, H:i:s",
    "logtimezone": "Europe\/Istanbul",
    "log.condition": {
        "apps": [
            "admin_audit"
        ]
    }
}

Cron Configuration: Array ( [backgroundjobs_mode] => cron [lastcron] => 1655983201 )

External storages: files_external is disabled

Encryption: no

User-backends:

  • OC\User\Database
  • OCA\User_LDAP\User_Proxy
LDAP configuration
+-------------------------------+---------------------------------------------------------------------------+
| Configuration                 | s01                                                                       |
+-------------------------------+---------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                         |
| homeFolderNamingRule          |                                                                           |
| lastJpegPhotoLookup           | 0                                                                         |
| ldapAgentName                 | CN=Otp Check,CN=users,DC=XXX,DC=grp                                     |
| ldapAgentPassword             | ***                                                                       |
| ldapAttributesForGroupSearch  |                                                                           |
| ldapAttributesForUserSearch   |                                                                           |
| ldapBackupHost                | dcpinarbasi02.XXX.grp                                                   |
| ldapBackupPort                | 389                                                                       |
| ldapBase                      | DC=XXX,DC=grp                                                           |
| ldapBaseGroups                | DC=XXX,DC=grp                                                           |
| ldapBaseUsers                 | DC=XXX,DC=grp                                                           |
| ldapCacheTTL                  | 600                                                                       |
| ldapConfigurationActive       | 1                                                                         |
| ldapDefaultPPolicyDN          |                                                                           |
| ldapDynamicGroupMemberURL     |                                                                           |
| ldapEmailAttribute            | mail                                                                      |
| ldapExperiencedAdmin          | 0                                                                         |
| ldapExpertUUIDGroupAttr       |                                                                           |
| ldapExpertUUIDUserAttr        |                                                                           |
| ldapExpertUsernameAttr        |                                                                           |
| ldapExtStorageHomeAttribute   |                                                                           |
| ldapGidNumber                 | gidNumber                                                                 |
| ldapGroupDisplayName          | displayname                                                               |
| ldapGroupFilter               | objectClass=posixGroup                                                    |
| ldapGroupFilterGroups         |                                                                           |
| ldapGroupFilterMode           | 1                                                                         |
| ldapGroupFilterObjectclass    |                                                                           |
| ldapGroupMemberAssocAttr      | member                                                                    |
| ldapHost                      | dcpinarbasi1.XXX.grp                                                    |
| ldapIgnoreNamingRules         |                                                                           |
| ldapLoginFilter               | (&(samaccountname=%uid)(memberof=cn=bulutusers,cn=users,dc=XXX,dc=grp)) |
| ldapLoginFilterAttributes     |                                                                           |
| ldapLoginFilterEmail          | 1                                                                         |
| ldapLoginFilterMode           | 1                                                                         |
| ldapLoginFilterUsername       | 1                                                                         |
| ldapMatchingRuleInChainState  | unknown                                                                   |
| ldapNestedGroups              | 0                                                                         |
| ldapOverrideMainServer        |                                                                           |
| ldapPagingSize                | 500                                                                       |
| ldapPort                      | 3268                                                                      |
| ldapQuotaAttribute            |                                                                           |
| ldapQuotaDefault              |                                                                           |
| ldapTLS                       | 0                                                                         |
| ldapUserAvatarRule            | default                                                                   |
| ldapUserDisplayName           | displayname                                                               |
| ldapUserDisplayName2          |                                                                           |
| ldapUserFilter                | memberof=cn=bulutusers,cn=users,dc=XXX,dc=grp                           |
| ldapUserFilterGroups          | BulutUsers                                                                |
| ldapUserFilterMode            | 1                                                                         |
| ldapUserFilterObjectclass     | person                                                                    |
| ldapUuidGroupAttribute        | auto                                                                      |
| ldapUuidUserAttribute         | auto                                                                      |
| turnOffCertCheck              | 0                                                                         |
| turnOnPasswordChange          | 0                                                                         |
| useMemberOfToDetectMembership | 1                                                                         |
+-------------------------------+---------------------------------------------------------------------------+

Your webserver’s virtual host configuration.

Or just move everything to the parent directory.

This will be the recommended installation for Nextcloud.