我有一个几乎没有使用过的 VPS。我很乐意将我拥有的几个域(通过其他地方的注册商)指向此 VPS 的不同文件夹。有什么办法可以做到这一点吗?
For example:
helloomgwtf.com -> 111.111.111.111/hello
hitherehowareyou.com -> 111.111.111.111/hithere
thirdrandomdomain.com -> 111.111.111.111/random
我对设置东西完全陌生,所以详细的解释会really受到赞赏。
Thanks!
您正在寻找虚拟主机。
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 有关于这方面的很好的信息here http://www.rackspace.com/knowledge_center/article/how-to-serve-multiple-domains-using-virtual-hosts.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)