Is it possible to host two application in one virtualmin with different ports?


  1. I would like to know is there a way to have same virtualmin hosted two applications with two different ports… one is for default port 80 & 443 and another one with different port for API service which might be 8084.

  2. if the first option is not available then I would create a subdomain and host API service from their, but however I want to access the same database for both parent and subdomain… How do we achieve it…?

Ubuntu 18.04 REQUIRED
Virtualmin 7.1 REQUIRED

The first option may well be available. I am answering your second question first since I am able to understand it better.

You can do that by creating a database on the top level virtual server / parent domain and then using the credentials of the database that you see on the top level virtual server in the code that you run on the sub server / subdomain.

Any virtual server / domain on a Virtualmin system can access any database hosted on Virtualmin if the credentials of the database are provided to it.

1 Like


I think you’d be better off using separate sub-domains in all 3 cases leaving each one independently able to use HTTP or HTTPS.

As Calport says - the database side of things is no issue and you can have all 3 access the same one.



This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.