Here's what's going on. I have a 2019 windows server, and on it Im running a webserver (apache2), and multiple Minecraft servers. I have a domain with multiple subdomains for each Minecraft server instance and the webserver. They're all in my domain DNS settings with both A and SRV records. That works all fine and dandy.

Let's say I have two Minecraft servers, running on different ports. First server is mc.domain.com, second is mc2.domain.com. Then for my webserver, it's site.domain.com. I can use each Minecraft domain and it connects to the corresponding server perfectly fine. I go to my web browser and put in site.domain.com and it brings me to that. Heres the issue, since this is all running on one machine and one IP, if I put mc.domain.com or mc2.domain.com in my web browser, it also points to site.domain.com.

How can I only allow site.domain.com to bring me to my webserver and not any other subdomain? Please don't close this and say duplicate and send me to a general "how to forward a Minecraft server" because that isn't my issue. Thank you.

  • From your original question, I didn't see that you were running Apache. That makes it easier. You can skip down to the configuring virtual hosts for Apache section of the answer. Commented Jun 11, 2021 at 19:15
  • Yeah that's my bad, I said it more specific when i originally said "Multicraft" but it uses Apache2 to host it I believe. I tried messing around with vhosts but it's a bit more complicated the way Multicraft sets it all up. I don't have the normal Apache panel that you'd see with XAMPP. I dont remember how I changed the vhosts conf file but even after that it didn't fix my issue. I can take a look tonight when I'm out of work and share what I changed. From other research I was thinking maybe having to set up a proxy to direct but I'm not 100% sure. This is mostly new to me. Thanks Commented Jun 11, 2021 at 19:46


Browse other questions tagged or ask your own question.