nextcloud URL issue

sword12
sword12 used Ask the Experts™
on
Hi Experts

i just installed nextcloud 13.0.1  on centos 7 it is working now

but i want our users to write in the browser  
https://nextcloud.domain.com           without /nextcloud    in the end i mean   not like this    https://nextcloud.domain.com/nextcloud

i know there is something i have to do on apache but i don't know where and how maybe in index.php   i am not sure and i don't know how

so please if you know give me step by step procedure

thanks
Sword
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
The paradigm you are seeking is the DOCUMENT ROOT, docroot, or home directory. From their documentation, it looks like a recursive copy into DOCROOT, see image below.

nextcloud.png
The command for you might look like this...

cp nextcloud
cp -r .  ..

Open in new window


I know that looks odd, but copy recursive current directory, out to next directory.

Author

Commented:
thnaks

so in my case my nextcloud right now up and running

and the location of nextcloud directory   /var/www/html/nextcloud

so can right now just issue this command without modifying any other confige file and you think everything will work

cp -r /var/www/html/nextcloud /var/www

and then you think it will work wihotu any issue ?

Commented:
Make a directory backup first, then do the cp.

You can restore if something is wrong and then adjust the target directory.
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

Author

Commented:
i will do this just i think i have to change the path in two files  if i am right please confirm

number one
[root@nextcloud ~]# more /etc/httpd/conf.d/nextcloud.conf
Alias /nextcloud "/var/www/html/nextcloud/"

<Directory /var/www/html/nextcloud/>
  Options +FollowSymlinks
  AllowOverride All

 <IfModule mod_dav.c>
  Dav off
 </IfModule>

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

</Directory>

***************************************

number two

[root@nextcloud ~]# more /var/www/html/nextcloud/config/config.php
<?php
$CONFIG = array (
  'instanceid' => 'ocfmpj6oq3t4',
  'passwordsalt' => 'Rq1wz7ucw/2UY0uXdpjQilSpxTCvktp',
  'secret' => 'i4xzK0TzoITn93XSX25pxA0TNHcAR8Gz6mmkkoyN6bpzggbKz',
  'trusted_domains' =>
  array (
    0 => '192.168.90.34',
  ),
  'datadirectory' => '/var/www/html/nextcloud/data',
  'overwrite.cli.url' => 'http://192.168.90.34/nextcloud',
  'dbtype' => 'mysql',
  'version' => '13.0.1.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nc_user',
  'dbpassword' => 'hieverybody',
  'installed' => true,
  'maintenance' => false,
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'updater.release.channel' => 'stable',
  'appstoreenabled' => true,
  'appstoreurl' => 'https://api.nextcloud.com/v1',
  'has_internet_connection' => true,
  'appcodechecker' => false,
);

**************************************************
so do you think i have to change in any other place also ?

thanks again

Commented:
Yes, the configuration change should be made in nextcloud.conf and the config.php

I think these should cover the critical changes.

Author

Commented:
thanks but i found this i found it more easy

https://www.tecmint.com/change-root-directory-of-apache-web-server/

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial