Hi @mag007,
Well the first part
is very easy as long as you can live with a redirection:
www.mydomain.tld --> www.mydomain.tld/wordpress/
you just use:
ucr set apache2/startsite='wordpress/'
For nextcloud you can find solutions in forum. There is a how-to for a template:
This worked by the time I wrote the template (and it is still working for me) but it might be possible that there is now - with a fresh install - a Nr. 5 todo. Look here: Nextcloud reverse proxy - #6 by fk22
You will find other posts regarding this too in the forum (if you hesitate to use a template).
Best, Bernd