Nextcloud on main FQDN

Quick question (and prob an obvious answer)

The FQDN is cloud.mydomain.com and nextcloud is reachable on /nextcloud.

Now I want to have nextcloud be reachable on the main FQDN cloud.mydomain.com, which is NOT a virtual host.

Any tips pls?

TIA

I’ve seen this Redirect root to a subdirectory but that redirects so the URL is cloud.mydomain.com/nextcloud, where I want the the FQDN as URL.

I think this is what you’re lokking for:

and

Hi @flatspin, thanks for the references. However, they all cover creating new virtual hosts, where my system FQDN is already cloud.mydomain.com (set as server name). So if I browse to https://cloud.mydomain.com I get the Nethserver success page, and I want to see Nextcloud login page without /nextcloud in the URL.

Thanks for your time!

Not exactly what you’re looking for, but an easy way to make this happen would be to change the main system FQDN. I don’t know that there’s a direct, supported way to do what you’re asking for.

1 Like

Thanks Dan,

here is my objective:

cloud.domain.com as main system FQDN, so all (LDAP) users have the correct email address in LDAP and thus in Nextcloud. Relay Nextcloud messages (Basic settings) to the other domain.com (i have no control, just a mail account on that side).

Have users login and see only a clean URL cloud.domain.com

There needs to be NO website on cloud.domain.com, only direct access to nextcloud.

as a test, setting the virtualhost for nextcloud and renaming zz_nextcloud.conf to make it load before nethserver.conf might make nextcloud be the default virtual host, but break things like access to FQDN/server-manager url and maybe more…

I think you can do it with a html-redirection. The code of the site you have to safe as /var/www/html/ should look like the following:

<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="0; url=https://cloud.mydomain.com/nextcloud">
        <script type="text/javascript">
            window.location.href = "https://cloud.mydomain.com/nextcloud"
        </script>
        <title>Page Redirection</title>
    </head>
    <body>
        <!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
        If you are not redirected automatically, follow this <a href='https://cloud.mydomain.com/nextcloud'>link to https://cloud.mydomain.com/nextcloud</a>.
    </body>
</html>

Name of the file has to be index.html

1 Like

@LayLow Did you solve it?

@m.traeumner thanks, no, not yet. I use the redirect atm but that ofcourse shows mydomain.com/nextcloud once redirected.

A reverse proxy with Apache or NGinx would solve the domain and url problem, can you use one of them?

1 Like

I guess so, I have the default NS7 apache and the nginx module of @mrmarkuz installed for Onlyoffice integration with Nextcloud.

Any directions much appreciated!

TIA

I tried that without success.
I am afraid that reverse proxying to the same host at same HTTPS port won’t work.

Did you try this one? It’s working for me:

1 Like