Assign letsencrypt certificate to vhost


(Gianluca) #1

NethServer Version: 7.5.1804 (final)
Module: nextcloud

Hello everybody! This is my first post on the community forum. I already searched through the posts but didn’t find a similar topic (if I’m not wrong…).

I’ve just installed the nextcloud module on a freshly installed NS instance and then added my public nextcloud domain name to the VirtualHost configuration ( as described here, and then I requested a Let’s Encrypt ssl certificate using the NS Server Certificate tool. Now I can see this new SSL certificate on the Server Certificate page, but the Nextcloud vhost is still served with server’s self signed SSL certificate.

How can I assign the Let’s Encrypt SSL certificate to the nextcloud virtual host? Perhaps do I need to request the Let’s Encrypt certificate from the CLI with certbot instead of using the server certificate tool from the admin interface?

Thank you in advance,

(Rob Bosch) #2

Start Server manager webinterface and find Configuration / assign certificate. There you can choose between selfsigned and LE certs…

(Gianluca) #3

From that section I’m only able to assign a SSL certificate server wide, not for a specific virtual host (see image)

Do I need any other server module? I did not install the nethserver-httpd-virtualhosts module…

(Davide Principi) #4

Yes you’re right! You need that package too…

Furthermore the docs page seems lacking instructions about vhost certificates /cc @docs_team

(Gianluca) #5

Now I added that package, too. Then I created a vhost for the nextcloud website and I was able to assign the letsencrypt certificate to that vhost, but… now this new vhost doesn’t serve the nextcloud application but a new website (with the nethserver placeholder home page). From the WebUI there is no option to specify the document root of the vhost.

(Markus Neuberger) #6

For the nextcloud virtual host you just need to set the server-wide Letsencrypt certificate as default as shown in your screenshot. You don’t need to create a vhost in web UI.

The nextcloud virtualhost domain has to be one of the domains in the Letsencrypt cert to get a working certificate.

(Gianluca) #7

Ok, this makes sense. I will include the NC domain name as well as the FQDN I use to manage the server itself. Thank you very much!