i appreciate your help here. I am close but nowhere with the new domain. It goes to the nethserver page only without ssl even though i have created a cert.
As @danb35 already explained here, in NethServer you just have one Letsenrypt certificate that covers all wanted domains.
So you just need to set the new certificate as default and it should work.
No. The Webserver virtualhosts in the server manager are intended for custom web projects that you want to install.
The NethServer apps use their own integrated virtualhost settings.
i think i understand now, the certifcate may say server3.mydomain.com, but it for all domains that are requested…that was not clear to me so thanks for that.
Now i have set the new one as default, as i forgot to check that as i didnt know, and reselected mynewdomain.com as the trusted domain for next cloud with no virtual host, but it is not the default for nextcloud.
All the certificates are working but i cannot access nextcloud without the extension
NethServer aims to be simple to use so it covers common cases. Needing 2 domains without path for the same Nextcloud instance is more like a corner case IMO.
It’s possible to customize things but it’s not manageable via server manager anymore.
To have two virtualhosts without the /nextcloud path you could just copy the apache conf file and replace the domain with the wanted second domain.
To create the right config file:
Enable the Nextcloud virtualhost and enter the first wanted domain. Add both wanted domains to the trusted domains.
Edit the copied config file /etc/httpd/conf.d/zz_nextcloud2.conf and replace the first with the second domain or server3.mydomain.com with mynewdomain.com
I have done as you stated above. I put in cloud.mydomain.com as my virtual host, added it as trusted domain along with mynewdomain.com. However, when i went to the file nextcloud.conf, it is a bit different.
The Virtual host has two domains and they are both the same.
Please note that it is pretty unexpected that you have to use subdomain for nextcloud…I thought i could simply call it newdomain.com and that would be the end of it.
The rest of the server seems to offer very complex services.
# ================= DO NOT MODIFY THIS FILE =================
#
# Manual changes will be lost when this file is regenerated.koo
#
# Please read the developer's guide, which is available
# at NethServer official site: https://www.nethserver.org
#
#
<VirtualHost *:80>
IncludeOptional conf.d/default-virtualhost.inc
</VirtualHost>
<VirtualHost *:80>
ServerName cloud.mydomain.com
RedirectMatch 301 ^(?!/.well-known/acme-challenge/).* https://cloud.mydomain.com
</VirtualHost>
<VirtualHost *:80>
ServerName cloud.mydomain.com
Redirect / https://cloud.mydomain.com/
</VirtualHost>
<VirtualHost *:443>
ServerName cloud.mydomain.com
SSLEngine on
RewriteCond %{HTTPS} !=on
RewriteRule (.*) https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
Alias / "/usr/share/nextcloud/"
<Directory "/usr/share/nextcloud">
Options +FollowSymLinks
AllowOverride All
Require all granted
<IfModule mod_dav.c>
Dav off
</IfModule>
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000"
</IfModule>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/rh-php80-php-fpm/nethserver-nextcloud-php80.sock|fcgi://localhost"
</FilesMatch>
SetEnv HOME /usr/share/nextcloud
SetEnv HTTP_HOME /usr/share/nextcloud
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
</Directory>
<Directory "/usr/share/nextcloud/data/">
# just in case if .htaccess gets disabled
Require all denied
</Directory>
</VirtualHost>
The correct file to edit is /etc/httpd/conf.d/zz_nextcloud2.conf .
Sorry, I don’t understand…Is something not working?
Yes, it is not as you described. The sample file is actually zz_nextcloud.conf…and as you can see there is one domain only.
I am confused, i thought i had to choose a subdomain as a virtual host…
I simply want to use mynewdomain.com…which is completely different from the main server domain, which is server3.mydomain.com. It points to the server and i would like to use it for nextcloud…as either a virtual host, or trusted domain or both…I dont care…just preferred not to use a subdomain for nextcloud…
i simply choose mynewdomain.com for the trusted host for nextcloud, and when i go to it, i get the main page for nethserver. The strangest part, is that even though i didnt select a virtual host, i can still reach /nextcloud from any FQDN pointing to the server.
I not made any change to any config settings other than adding the country for the phone number, which doesn’t work.
I thought you want to use server3.mydomain.com and mynewdomain.com as Nextcloud virtualhost without needing the /nextcloud path.
If /etc/httpd/conf.d/zz_nextcloud2.conf exists, please delete it.
Just set mynewdomain.com as Nextcloud virtual host in the server manager and add the domain to the trusted domains.
Now it should be possible to go to Nextcloud via https://mynewdomain.com and not via https://server3.mydomain.com/nextcloud anymore.
That’s is the one shipped with the installed package.
The one Markus is refering to is to create a new file to allow you to have more than one virtual host for nextcloud
That is exactly what I did, it doesn’t work without /nextcloud for any domain. All domains point to nethserver splash page and all wor with /nextcloud., including my new domain.com even though it is the only selection as a trusted domain for nextcloud.