how to assing an ip and specific port to a subdomain

Hi, i have the following problem for 3 days now. It is not a bug but i dont know if i can do that with virtualmin.

I have a dedicated server and a specific ip address. i have the domain name "mydomain.com" with an ip: xxx.xxx.xxx.xxx and i want to have a subdomain lets say "example.mydomain.com' that when i type it in any browser will point at "mydomain.com:9090" where i have an application running. Is this possible to do and if it is how??

Thank you in advance Yiorgos Katopodis

Status: 
Active

Comments

Yes, you can do this using proxying. The steps to take are :

  1. Create the example.mydomain.com virtual server in Virtualmin, as a sub-server of mydomain.com
  2. After creation, go to Server Configuration -> Proxy Paths.
  3. Create a new proxy, with the Local URL path set to / and the Destination URLs set to http://mydomain.com:9090
  4. Click Save

From now on, when you go to http://example.mydomain.com/ you should see content from the app on port 9090.