How can i host multi onion service on the same server?

The Onion_Services wiki describes how to host one onion service but what about hosting multi onion service with each of their own onion address on the same server?

Replace variables that need replacing. Rinse and repeat.

Made some edits just now:
Onion Services: Difference between revisions - Whonix

Thank you bro
I tried do what you mention in previous reply as below please correct me if i do something wrong

i run the below command

sudo nano /usr/local/etc/torrc.d/50_user.conf

Then add below lines in this file

HiddenServiceDir /var/lib/tor/hidden_service/
HiddenServicePort 80 10.152.152.11:80
HiddenServiceVersion 3

HiddenServiceDir /var/lib/tor/hidden_service2/
HiddenServicePort 82 10.152.152.11:82
HiddenServiceVersion 3

Then i restart tor

Then i runned the below commands to get two onion service addresses but what is changes needed to do in Whonix-Workstation to map web server to second address onion service?

sudo cat /var/lib/tor/hidden_service/hostname

sudo cat /var/lib/tor/hidden_service2/hostname

You need to configure the web server to listen on two different ports to provide different websites.

The ports don’t matter since it’s only the backend.

  • frontend server domain1:80 can be served by backend server port 80
  • frontend server domain2:80 can be served by backend server port 81

From above you can see I don’t need any Tor specific terminology for this. Unspecific to Whonix.

Even on clearnet it would be similar. Users could have multiple fontend servers. server1 domain1:80. server 2 domain1:80. These frontend servers could be served by the same backend.

The frontend server could be a load balancer.

In Tor specific case, Tor is kinda similar to a “load balancer”. It can serve a huge amount of domains and virtual ports (onion) (frontend) which are then served by any backend.