Nextcloud on subdomain

Hey guys,

first off, I noticed that this has been asked a few times but regardless of where I read, I either dont get it or it doesnt work. I just bought my own domain and now my plan was to use for my nextcloud and for a different page. My cloud listens to the but to the normal as well and Im too dumb to figure out how to change that and how to let be a different page. Again, I read through a few articles about this here already and didnt get it so… uh yeah. big idiot here that needs some foolproof instructions.

Would really appreciate it. If you need any config files or whatever, just let me know.

Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): Apache2.4.41
PHP version (eg, 7.4): 7.4

You would create different virtual hosts in apache:

It’s the first example but instead of different domains you can have one vhost for and the other one for
If you use placeholders such as ServerAlias *, you might want to check for a specific vhost, in which order it has to be put.

Also check logfiles, some vhosts might not be used because of syntax errors.

Virtual hosts in Apache should solve it out.
You need to find it out on the net though, how to do it properly.
Needs some work but doable.