Adding Domain Names

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.

1 Like

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

1 Like

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.

This is not what I was trying to accomplish

Hm, that’s weird, it should just work.

Maybe it helps to reconfigure Nextcloud:

signal-event nethserver-nextcloud-update

Let’s check the virtualhosts used in apache:

httpd -S

and the Nextcloud config:

config show nextcloud

1 Like

no change

VirtualHost configuration:
VirtualHost configuration:
*:80 is a NameVirtualHost
default server server3.mydomain.com (/etc/httpd/conf.d/virtualhosts.conf:12)
port 80 namevhost server3.mydomain.com (/etc/httpd/conf.d/virtualhosts.conf:12)
port 80 namevhost server3.mydomain.com (/etc/httpd/conf.d/zz_mattermost.conf:9)
port 80 namevhost mattermost.mydomain.com (/etc/httpd/conf.d/zz_mattermost.conf:13)
*:443 is a NameVirtualHost
default server server3.mydomain.com (/etc/httpd/conf.d/nethserver.conf:41)
port 443 namevhost server3.mydomain.com (/etc/httpd/conf.d/nethserver.conf:41)
port 443 namevhost server3.mydomain.com (/etc/httpd/conf.d/ssl.conf:56)
port 443 namevhost mattermost.mydomain.com (/etc/httpd/conf.d/zz_mattermost.conf:18)
ServerRoot: “/etc/httpd”
Main DocumentRoot: “/var/www/html”
Main ErrorLog: “/etc/httpd/logs/error_log”
Mutex mpm-accept: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex authdigest-client: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir=“/run/httpd/” mechanism=default
PidFile: “/run/httpd/httpd.pid”
Define: _RH_HAS_HTTPPROTOCOLOPTIONS
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
User: name=“apache” id=48
Group: name=“apache” id=48

nextcloud=configuration
HonorAdStartTls=enabled
TrustedDomains=mynewdomain.com
VirtualHost=
Wellknown=disabled

hopefully this will tell the story

It seems you didn’t set mynewdomain.com as a virtualhost in Nextcloud.

Set it like this:

2 Likes

I tried that in the beginning.

Must contain at least two dots, like 'myhost.example.com

That is the error i get

1 Like

Let’s try to set it manually:

config setprop nextcloud VirtualHost mynewdomain.com

Apply the new config:

signal-event nethserver-nextcloud-save

1 Like

YOOUUUUUUUUUUUUUUUUUUU DAAAAAAAAAAAAAAAAAAAA MANNNNNNNNNNNNNNNN

Thanks very much Markuz and Marc for your patience and help…there is no way i could have come close to figuring this out, although in the end it turned about to be quite a simple and quick solution!!!

1 Like

To make the proper configuration file:
Select the first desired domain and enable the Nextcloud virtualhost. To the trusted domains, add the two desired domains.