Newsroom Update

Beginning in May, a special Today at Apple series titled “Made for Business” will offer small business owners and entrepreneurs free opportunities to learn how Apple products and services can support their growth and success. Learn more >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Multiple domains

I need to set up my server to host 4 domains. I need some external application to connect to myserver with th folowong domain and port


mydomain1.com:25565

mydomain2.com:25565

mydomain3.com:25565

mydomain4.com:25565


everything works well with one domain but i can't do it for 4 domains


any solution?

Mac mini, OS X Server

Posted on Apr 18, 2013 11:10 AM

Reply
3 replies

Apr 18, 2013 12:36 PM in response to Jygsaw98

I'd normally assume this sort of domain stuff is web services, but this could well be some other services, particularly given TCP port 25565 is commonly used for Minecraft servers.


In general, this involves...

  • setting up four external CNAME records (aliases) aimed at your external IP address (and at that same IP address associated with your server's public A (machine) record,
  • opening up port forwarding on your gateway device for 25565 traffic, and possibly also the server firewall,
  • ensuring that Java is installed and current (and not blocked by Xprotect due to a Java security bug),
  • configuring four virtual hosts on your OS X Server box, within Minecraft server or within the web server or whatever's listening, each listening to port 25565 and aimed at whatever directory or directories are involved),
  • testing the network connectivity with dig and telnet, and reading the Minecraft server logs or the web server logs or whatever you're trying to configure and run on those ports to figure out what did or didn't happen.


If this is Minecraft, then there's not really anything specific to OS X Server here, beyond whatever you're using to initially launch the Minecraft server at boot or as a connection arrives. The rest is all setting up Java and Minecraft, and that's probably better asked in a Minecraft forum. Java applications can be sensitive to the stack size and related settings specified at launch, but that too is something specific to Minecraft and not really tied to OS X or OS X Server.


There's an overview of running Minecraft available here that might provide some insight.


How (or if) the Minecraft server implements virtual hosting, I don't know. Based on a very quick look at what's in the server properties, it doesn't appear that the Minecraft server supports virtual hosting, but I'm not certain of that. And if the server doesn't support this, you'll either need your clients to specify different ports, you'll need clients that honor DNS SRV records (unlikely) or you won't be able to run multiple Minecraft servers on one host. You'd need to run one server, or implement a virtual machine and run the various servers as guests within the virtual hosts.


Do you have particular errors or details on the failing connection?


Log data or errors from the failure? Stackdumps? Do the ports all connect as expected?


Is this Minecraft?

Apr 18, 2013 1:31 PM in response to MrHoffman

Yes, this is a minecraft server.


Today i run 3 minecraft server on my computer each with the same domain name and 3 different port. so the set up is done for domain, A-record, firewall java and minecraft, everything works perfect, But I whant now to use different domain for each of the micraft server on my computer, this to advoid confusion with port nummber for my players.


My setup is:

OSX Server ML

Mac mini i5 2,5

16gb ram

256 ssd +1gb hd

1 ethernet, 1 wifi.


I've tryed 2 ip before, one ethernet + one wifi, it s works but wifi is not optimum and then I need 3 or 4 local ip.


I suppose it will invole DNS DHCP services setting for virtual hosts, but I've never done that before

Apr 18, 2013 4:43 PM in response to Jygsaw98

Please check with the Minecraft folks directly about running multiple servers on one TCP port. (This isn't an OS X or OS X Server question, this is a Minecraft server networking question.) From what I could find with some quick research, there's no mechanism akin to Apache's virtual hosting support that would allow separate Minecraft servers to share a TCP port on a single host. Put another way, from what I can see of Minecraft, there can be at most one server on one TCP port. But check with the Minecraft folks to be certain of this.


If you use a different TCP port for each server, then your configuration will likely work.


Alternatively — if you choose to configure and run multiple different guests as instances within a virtual machine — you'll have the equivalent of multiple different computers, all running within one physical box. This means you're not sharing a TCP port among the Minecraft servers. You'll need multiple public IP addresses for this to work, as the arriving client connections are by IP address and not host name.


Some background on IP networking...


There's generally only one process that can be connected to a specific local TCP port on a specific computer, though various remote clients can connect to that port; depending on the details of the application code, there's either a one-to-one or many-to-one relationship of clients to the server.


DNS is only relevent here in the context specific to the remote client — at the remote locations — being able to acquire the target IP address from the target DNS host name.


DNS SRV records include a port number, and can provide a way for a client to determine what the target port is, but I'd tend to doubt that the Minecraft clients know how to use an SRV record. From what I can tell, the clients are probably just defaulting the target port, or are manually configured for the server port.


DHCP is unrelated to this entire discussion. That vends IP addresses to requesters from a pool of IP addresses, allowing a network administrator to both avoid having to assign addresses to specific clients, and to make more efficient use of a (smaller) IP address pool when not all the clients may or will be present together on the network.


Apache virtual hosting works because the target host name is included inside the HTTP or HTTPS messages, and a single Apache server can key off of that name to select the target enviroment for the incoming connection. Without the host name within the data stream or some other specific identification of the target — the DNS host name is not passed along with an IP connection by default, just the target IP address — virtual hosting and the associated port sharing isn't feasible.


Again, please check with the Minecraft folks and see if it's even possible to run multiple servers on one TCP port. You're not asking OS X Server questions here...

Multiple domains

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.