Nextcloud on main FQDN

nextcloud

(HF) #1

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


(HF) #2

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.


(Ralf Jeckel) #3

I think this is what you’re lokking for:


and


(HF) #4

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!


(Dan) #5

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.


(HF) #6

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.


(Marc) #7

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…


(Michael Träumner) #8

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


(Michael Träumner) #9

@LayLow Did you solve it?


(HF) #10

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


(Sergio Luiz) #11

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


(HF) #12

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


(Markus Neuberger) #13

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: