简体   繁体   English

Godaddy的子域无法转发到基于名称的虚拟主机

[英]Godaddy's sub-domain cannot forward to name base virtual host

I used Amazon Ec2 instance and I usually forward domain and sub-domains to create multiple website on single instance server. 我使用Amazon Ec2实例,通常会转发域和子域,以在单个实例服务器上创建多个网站。 It working perfect with domain purchased from another domain registerer. 它与从其他域名注册商购买的域名完美搭配。 Unfortunately, I purchased domain from Godaddy, create subdomain and forward to same ip address with same technology is not working. 不幸的是,我从Godaddy购买了域,创建了子域并使用相同的技术转发到相同的IP地址不起作用。 It always show the first website. 它总是显示第一个网站。 Anyone can help with this issue? 任何人都可以帮助解决这个问题?

<VirtualHost *:80>
ServerAdmin xx.xxx.x.xx
ServerName sub.domian.com
#DirectoryIndex public/index.php
DocumentRoot "/var/www/html/foldername"
ErrorLog "logs/name-error.log"
CustomLog "logs/foldername-access.log" common
</VirtualHost>

Finally, I fixed by myself to work multiple sub-domain website on single EC2 Instance. 最后,我自己修复了在单个EC2实例上工作多个子域网站的问题。 At first, I set server ip address in Sub-Domain "Forward to" address. 首先,我在“转发至”子域地址中设置服务器IP地址。 But, in the A Record of sub-domain is seem like "Forwarded" and I simply change it to my server IP. 但是,在A记录的子域中似乎是“已转发”,我只是将其更改为服务器IP。 Now it is working. 现在正在工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM