Hi all,
I’m all round almost-noob, so sorry if I’m doing something wrong (such as asking this in the wrong place), but I would like to learn, so any help or suggestion would be really appreciated.
Context
I’ve installed NextCloudPi (NCP) on a Raspberry 4, flashing it on the sd card.
After that, I mooved the root partition (/) to a SDD connected through the USB3 port.
I configured a dynamic DNS (duckDNS) to access from outside, using ncp-config.
It worked well: I can access NCP through mydomain(dot)duckdns(dot)org.
After that, I bought a domain, lets say mydomain(dot)org.
Question
I would like to access my nextcloud through a subdomain, lets say (typical example, I spent a lot of time searching…) cloud(dot)mydomain(dot)org
& (and)
I would like to use my domain’s root (mydomain(dot)org) hosting some page, also static html pages, to start.
Ideally, I would like to have a pico cms page on the domain’s root (so that I can change it editing one .md file and pushing through git, but perhaps it is another story…).
Current Situation
Befor asking, I tried to do something, and I’ve elaborated some (partial and confused) ideas.
To have NCP on the subdomain, I added a CNAME record to the domain’s configuration panel, which points to cloud.mydomain.org .
So now I can access NCP using mydomain(dot)duckdns(dot)org OR cloud(dot)mydomain(dot)org.
This is cool, but right now if I try accessing to mydomain.org (so without subdomain) I obtain “nothing found, it’s impossible to reach the server” (or something similar, clearly I’m not native english and I obtained something equivalent).
I suppose the solution pass through editing /etc/apache2/avaiable-sites/nextcloud.conf, and I suppose that having just one (CNAME) record on my domain it is not enough… I spent some time on duckduckgo and on the apache documentation, but I’m anything but sure on how I can achieve this.
Conclusion
If you arrived till here, I really want to thank you for your kind patience.
Have a good day
BB