0

我有一个静态公共 IP,我在上面托管我的网站(Ubuntu Server 12.04)。我需要设置一个子域,但它不起作用,即使是 www。不管用。我从 GoDaddy 购买了域名并设置了正确的 NS

我将配置文件保存/etc/apache2/sites-available在 domain.me 下,然后我a2ensite domain.me重新加载并重新启动了 apache2,但仍然没有运气。

这是我的配置文件

<VirtualHost *:80>
  ServerAdmin webmaster@domain.me
  ServerName  domain.me
  ServerAlias www.domain.me
  DocumentRoot /var/www
  LogLevel warn
  ErrorLog  /var/log/apache2/error.log
  CustomLog /var/log/apache2/access.log combined
</VirtualHost>

<VirtualHost *:80>
  ServerAdmin webmaster@domain.me
  ServerName  me.subdomain.me
  ServerAlias www.me.subdomain.me
  DocumentRoot /var/www/subdomain
</VirtualHost>

curl http://domain.me输出索引文件,curl http://www.domain.me输出curl: (6) Couldn't resolve host 'www.domain.me'和子域相同

4

1 回答 1

2

我设法修复了它,对于那些遇到同样问题的人,请确保您设置了 A 记录

于 2013-04-28T18:21:08.023 回答