我可以将子域配置为指向服务器上的特定端口吗? [英] Can I configure a subdomain to point to a specific port on my server

查看:100
本文介绍了我可以将子域配置为指向服务器上的特定端口吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台旧计算机,我将其转换为Minecraft服务器.我有2个同时运行的Minecraft服务器,其中一个在端口25565(默认)上运行,另外一个在端口25566上运行.

I have an old computer which I converted into a minecraft server. I have 2 minecraft servers running simultaneously, one on port 25565 (default) and one on port 25566.

我购买了something.com域,并将其指向我的服务器.现在,在游戏中,您键入something.com进入第一台服务器,然后键入something.com:25566进入另一台服务器.

I bought the domain something.com and pointed it to my server. Right now, in the game you type something.com to get into the first server and something.com:25566 to get into the other server.

是否可以将one.something.com设置为指向第一台服务器,将two.something.com设置为指向第二台服务器?我拥有(centos)服务器,具有root用户访问权限,并且拥有其他所有权限.如果有区别,则该域由no-ip控制.我知道DNS与端口号没有关系,但是如果可以安装一个程序来使这项工作正常进行?

Is there a way to set one.something.com to point to the first server and two.something.com to point to the second server? I own the (centos) server, have root access, and everything else. The domain is controlled by no-ip if that makes a difference. I know that DNS has no relationship to port numbers but if there a program I can install to make this work?

谢谢:)

推荐答案

如果服务器上只有一个IP,则没有机会这样做. DNS是一个简单的名称到数字(IP)解析器.如果服务器上有两个IP,则可以将每个子域指向每个IP地址,并在每个IP的默认端口上运行两个服务器.
one.example.com-> 127.0.0.1(服务器:127.0.0.1:25565)
two.example.com-> 127.0.0.2(服务器:127.0.0.2:25565)

If you only got one IP on the server, there is no chance to do that. DNS is a simple name to number (IP) resolver. If you have two IPs on the server, you can point each subdomain to each of the IP-addresses and run both servers on the default port on each IP.
one.example.com -> 127.0.0.1 (server: 127.0.0.1:25565)
two.example.com -> 127.0.0.2 (server: 127.0.0.2:25565)

这篇关于我可以将子域配置为指向服务器上的特定端口吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆