Nextcloud in new virtualhost

NethServer Version: 7.3.1611
Module: nextcloud

Hi,

i installed the virtualhost module and created a vhost ‘nextcloud.domain.xyz’. Now I want to install nextcloud within this vhost. When I install nethserver-nextcloud it´s installed in /var/www/html/nextcloud. Can I simply move the whole folder to “/var/lib/nethserver/vhost/nextcloud” or do I have to install nextcloud manually (not via nethserver-nextcloud)?

Regards,
Joachim

Hi @schweidj
if you install nethserver-nextcloud and create the virtualhost nextcloud.domain.xyz,
you can create a symlink to /var/lib/nethserver/vhost/nextcloud

ln -s /var/www/html/nextcloud/ /var/lib/nethserver/vhost/nextcloud/nextcloud

and add the new domain among those accepted by nextcloud

config setprop nextcloud TrustedDomains nextcloud.domain.xyz
signal-event nethserver-nextcloud-update

if you want the root of nextcloud in nextclound.domain.xyz it can create a file /var/lib/nethserver/vhost/nextcloud/index.php containing::

<?php
   header ("location: http://nextcloud.domain.xyz/nextcloud/index.php");
?>
5 Likes

Hi @enzoturri

thank you very much.

Regards,
Joachim

hi there,

is this solution still valid in nethserver 7.7 (fresh installation, no upgrade)?
The nethserver-nextcloud folder seems to be in /var/lib/nextcloud here
and there is no folder like /var/lib/nethserver/vhost also.

Regards
yummiweb

No need to follow this procedure. You can follow the instructions from the docs:

Please note that after the configuration of a custom virtual host, Nextcloud will no longer be accessibile from the default URL https://your_nethserver_ip/nextcloud .

If the machine is using Let’s Encrypt, remember to add the virtual host domain name to list of valid certificate domains.

config setprop nextcloud VirtualHost <VHOST>.<DOMAIN_NAME>
config setprop nextcloud TrustedDomains <VHOST>.<DOMAIN_NAME>
signal-event nethserver-nextcloud-update