本文介绍了如何将多个域指向一台服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个几乎没有使用过的VPS.我希望将我拥有的多个域(通过其他地方的注册商)指向此VPS的不同文件夹.有什么办法吗?
I have a VPS that's barely being used. I would love to point several domains I have (through a registrar somewhere else) to different folders of this VPS. Is there any way to do this?
For example:
helloomgwtf.com -> 111.111.111.111/hello
hitherehowareyou.com -> 111.111.111.111/hithere
thirdrandomdomain.com -> 111.111.111.111/random
我是新手,所以非常感谢您进行详细的解释.
I'm entirely new to setting stuff up, so detailed explanations would really be appreciated.
谢谢!
推荐答案
您正在寻找虚拟主机.
NameVirtualHost *:80
<VirtualHost *:80>
ServerName helloomgwtf.com
DocumentRoot /var/www/vhosts/hello
</VirtualHost>
<VirtualHost *:80>
ServerName hitherehowareyou.com
DocumentRoot /var/www/vhosts/hithere
</VirtualHost>
<VirtualHost *:80>
ServerName thirdrandomdomain.com
DocumentRoot /var/www/vhosts/random
</VirtualHost>
Rackspace在此这里.
Rackspace has pretty good info on this here.
这篇关于如何将多个域指向一台服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!