Vhosts and Subdomains

Hi,
I thought it would be easy and quickly done to install the latest Nethserver once more with its email, roundcube and nextcloud facilities and to organize roundcube and nextcloud as subdomain vhosts like ‘webmail.example.org’ and ‘cloud.example.org’. Initially both worked as ‘nethserver/nextcloud’ and ‘nethserver/webmail’. But since I installed the vhost app, none of them is reachable anymore.
I know that this subject has often been discussed over the years. But things have changed, so I’m looking now for an appropriate howto to get this done. Does such a howto exist?
Best,
Ralph

Hi @rasi

For Nextcloud, at least, it’s very easy!

Don’t touch the virtual hosts for NethServer at all, if you have, remove everything!

Roundcube - if my memory serves me right - needs a reverse proxy, not a virtual host in NethServer Cockpit to work.

→ Using a virtual host from the built in Apache webserver will usually screw up any built in Application like Nextcloud or Roundcube!

My 2 cents
Andy

1 Like

Hi Andy,
thanks for the quick response. The LE certs may be a problem: I use Haproxy in Pfsense with a wildcard certificate and ssl offloading. Before I had nextcloud and mailserver with roundcube running in Proxmox containers which worked well. Now I’m just combining things in order to have less maintenance effort.
So, I have entered nextcloud as “cloud” in the NS vhost app. But all I get is what ‘var/www’ contains.
What can I do?
Cheers,
Ralph

Remove ALL vhost entries for NextCloud.
NethServers vhosts are NOT intended or suitable for the built in applications! They will just break things.

Use the host settings as above in the NethServer Nextcloud settings, as shown above.
Reboot.

I don’t think HAProxy can handle the revers-proxy well, I do know that nginx reverse proxy works with Nextcloud. If that handles your SSL, fine.

My 2 cents
Andy

I removed the whole vhost app and rebooted.
Only now I see that my menu list on the left side is different form yours: mine ends with Terminal. What am I missing here?

You can go into Applications, and highlight whatever applications you use most often, or most important for you, they will go below Terminal…

Three dots again…

I would keep the vhost app, just emove any configuration you made in there. It can be re-installed easy enough.

The three dots let me only remove the application, it does not provide a menu entry on the left side.
And please tell me where nexctloud is supposed to be installed. Should it not be in /var/lib/nethserver? Here it goes into /usr/share. Should I set a soft link between both?

No need.

Nextcloud itself is under /usr/share/nextcloud, the data itself and apps etc are all under /var/lib/nethserver/nextcloud.

The system installs everything needed.

I do get more…

Me not. I’m going to reinstall nethserver from scratch. Then we’ll see. Thanks a lot so far.