These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Forward subdomain to a port number on the new forum.
I am trying to forward a subdomain to a specific port #.
Example: I have installed a jukebox server and it is using domain:port. Instead of using my domain:port I would like to use subdomain.domain.com and forward it to domain:port so I do not have to enter the port # to access the site. Is this even possible?
Sure this is possible, using the magic of
mod_rewrite
. I suppose there's nearly nothing that you can't do with mod_rewrite. ;) It is also what Virtualmin itself uses to realize the forward of "webmail.mydomain.tld" to "https://mydomain.tld:20000".Here's the syntax for the Apache config:
Replace "h-t-t-p" with "http" of course when you enter it. Need to write it this way because otherwise this "suboptimal" forum software will auto-convert it to some nasty attempt to produce an a href link. :)
In addition, you need to configure your BIND DOMAIN to have "subdomain.domain.com" resolve to the appropriate IP address.