RaspberryPI - Web Server parallel to Nextcloud to VPN to Torrent

Hello, I am new to all of this, but i don’t give up easily.
I have bought a Raspi 4 - 4Gb to do the following with it:
Webserver - official tutorial from here - https://projects.raspberrypi.org/en/pro … -wordpress
Torrent Box - Deluged - tutorial from here - https://pimylifeup.com/raspberry-pi-deluge/
Cloud Server - Nextcloud

I have managed to install the Torrent Client and the Wordpress Web Server, they work.

Now i want to install the Nextcloud server, and i won’t know how to setup a “virtual host” in Apache2 / which files to edit so that the 2 services run in parallel.
I would like to set the Wordpress server as default web server on port 80, so that if you entry the web address, the Wordpress page should load up by default, and I would like to setup Nextcloud server on port 880 for example … or any other port.

How should I proceed ? what should I do before I install the Nextcloud server ?

I think I have to :

  1. set a the wordpress server to another port: 881
  2. copy the wordpress files no another folder (from /var/www/html to /var/www/html2)
  3. install nextcloud server
  4. Set nextcloud server to port: 880
  5. Set back the wordpress server to port: 80

And afterwards install PiVPN

Problem: I don’t know how to perform the steps under: “ I think I have to ” and where to find the ports, where to find the files, which command lines do I need to perform this.

Can someone please help me out, and tell me if the steps are ok ? and if everything could work as described above, and maybe some command lines to perform this?
Thank you !!

Virtual Host setup in Apache is quite straightforward. Follow this guide:

If you don’t have a real domain, create the name in /etc/hosts.